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); } }
private boolean getFlag(PlayerField fld) { int f = (1 << fld.ordinal()); return (flags & f) == f; }