public void playMove(string to, string from, IPlayer player, IReferee referee) { if (referee.isValidMove(to, from, player)) { Tile tileTo = new Tile(to, new Piece(player.symbol, to)); Tile tileFrom = new Tile(from, new Piece(Symbol.BL, from)); board.updateTile(tileTo); board.updateTile(tileFrom); } else { Console.WriteLine("Invalid move, please make a valid move"); } }
public bool canmove(string from, string to, IBoard board, IReferee referee, IPlayer player) { return(referee.isValidMove(from, to, player)); }