コード例 #1
0
 private boolean EverybodyInEnd(Group group) {
   boolean retValue = true;
   for (Player player : group.getPlayers()) {
     if (!player.getActRoom().equals(House.poison)) {
       retValue = false;
     }
   }
   if (group.equals(poisonGroup)) {
     retValue = false;
   }
   // System.out.println(group.getName()+" group: "+retValue);
   return retValue;
 }
コード例 #2
0
  public boolean isSameNextRoomGroup(Group group) {

    boolean ret = true;
    synchronized (group) {
      if (!nextRoom.getPlayers().isEmpty()) {
        for (Player player : nextRoom.getPlayers()) {
          if (!player.getGroup().equals(group)) {
            ret = false;
          }
        }
      }
    }
    return ret;
  }
コード例 #3
0
 private void setFirstRoom(Group g) {
   // TODO Auto-generated method stub
   for (Player item : g.getPlayers()) {
     item.setActRoom(house.getFirstRoom());
   }
 }
コード例 #4
0
 private void InterruptAllPeople(Group group) {
   for (Player player : group.getPlayers()) {
     player.getActRoom().getPlayers().remove(player);
   }
 }