Board implements IBoard { @Override public boolean isOverflagged() { for (Field field : itsFields) if (field.isOpen() && isOverflagged(field)) return true; return false; } Board(final int dimX, final int dimY); private  Board(final BoardState state); @Override IField getField(final int x, final int y); @Override Point getDimension(); @Override int getFlagCount(); @Override int getOpenCount(); void openAllFlaggedOrBomb(); @Override String toString(); @Override Point getPosition(final IField field); @Override boolean isOverflagged(); boolean isExploded(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testIsOverflagged() { flag(0, 0); bomb(0, 0); flag(1, 0); open(1, 1); assertEquals(true, itsBoard.isOverflagged()); }
@Test public void testIsOverflaggedBeforeOpen() { flag(0, 0); flag(1, 0); assertEquals(false, itsBoard.isOverflagged()); }