Example #1
0
        public BattleshipGridCell NewCellState(BattleshipGridCell prevCellState)
        {
            if (_cellStatesAfterHit.Contains(prevCellState))
            {
                throw new CellRepetitionException();
            }

            return(_nextStateMappings[prevCellState]);
        }
Example #2
0
 public char GetCellValueToDisplay(BattleshipGridCell cell)
 {
     return(_displayMappings[cell]);
 }