// FIXME: 12/6/2015 Fix chairsLeft algorithm. It looks to be based upon number of Groups instead // of number of Persons in the group. int getNumberOfFilledChairs() { int number = 0; for (Group group : this) { number += group.size(); } return number; }
boolean isFull() { int count = 0; for (Group group : chairs) { count += group.size(); } return count >= maxNumberOfChairs; }
@Override protected boolean checkPass(Clonotype clonotype) { Group group = control.getGroup(clonotype); if (group == null || group.size() < 3) { return clonotype.getCount() > 3; } else { return control.isRare(group) && group.isEnriched(clonotype); } }
private Grid<Integer> calculateInitialGrid( final int[][] clues, final Map<Coord, Group> groupByCoord) { final Map<Coord, Set<Integer>> grid = Coord.overGrid(_width, _height) .collect( Collectors.toMap( identity(), coord -> { final int given = coord.fromIntArray(clues); final Group group = groupByCoord.get(coord); return given > 0 ? Collections.<Integer>singleton(given) : intSet(group.size()); })); return new Grid<>(grid, _width, _height); }