public void Restart(OthelloBoardType?othelloBoardType = null) { OthelloBoardType selected = othelloBoardType ?? currentBoardType; game = othelloBoardFactory.Create(selected).Game; currentBoardType = selected; }
public BoardInfo Create(OthelloBoardType boardType) { var info = tbl.FirstOrDefault(x => x.boardType == boardType); if (info == null) { throw new NotImplementedException("That othello board is not implemented."); } var factory = new OthelloBoardFactoryFromString(); Dictionary <char, StoneType> players; var game = factory.Create(info.board, info.first, out players); return(new BoardInfo() { BoardType = boardType, Game = game, PlayerNumber = players.Count }); }