예제 #1
0
 private void setFlag(PlayerField fld, boolean on) {
   if (!on) {
     flags &= ~(1 << fld.ordinal());
   } else {
     flags |= (1 << fld.ordinal());
   }
   if (id != -1) {
     BBUsersTable.getInstance().addOrUpdatePlayer(this);
   }
 }
예제 #2
0
 private boolean getFlag(PlayerField fld) {
   int f = (1 << fld.ordinal());
   return (flags & f) == f;
 }