Exemplo n.º 1
0
        public void playPlace(string pos, IPlayer player, IReferee referee)
        {
            if (referee.isValidPlace(pos, this))
            {
                Tile t = new Tile(pos, new Piece(player.symbol, pos));
                if (player.LastPosPlayed.Contains(pos))
                {
                    player.LastPosPlayed.Remove(pos);
                }

                player.LastPosPlayed.Add(pos);
                board.updateTile(t);
                cowBox.takeCow(player.symbol);
            }
            else
            {
                Console.WriteLine("Invalid move, please make a valid move");
            }
        }
Exemplo n.º 2
0
 public bool place(string pos, IBoard board, IReferee referee)
 {
     return(referee.isValidPlace(pos, this));
 }