Skip to content
Snippets Groups Projects

Resolve "Fix large grid display"

Merged Colin DAMON requested to merge 110-fix-large-grid-display into master
3 files
+ 12
5
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -8,10 +8,12 @@ import java.util.stream.Stream;
public class Grid {
private final Set<Cell> aliveCells;
private final Set<Cell> deadCells;
private final Box border;
Grid(Set<Cell> aliveCells) {
this.aliveCells = aliveCells;
this.deadCells = buildDeadCells(aliveCells);
border = new Box(aliveCells);
}
@@ -25,6 +27,10 @@ public class Grid {
.collect(Collectors.toUnmodifiableSet());
}
public boolean isAlive(Cell cell) {
return aliveCells.contains(cell);
}
public Collection<Cell> deadCells() {
return deadCells;
}
Loading