Ejemplo n.º 1
0
        public void MovePlayer(Player player, int spacesToMove)
        {
            for (int spacesMoved = 1; spacesMoved <= spacesToMove; spacesMoved++)
            {
                if (player.Location + 1 >= board.NumberOfSquares)
                {
                    player.Location = 0;
                }
                else
                {
                    player.Location++;
                }

                if (board.GetSquareAtPosition(player.Location).ApplyEffectOnPass)
                {
                    board.GetSquareAtPosition(player.Location).ApplyEffect(board, player, spacesToMove);
                }
            }
        }
Ejemplo n.º 2
0
 public void ApplyEffectForCurrentPosition(Player currentPlayer, int roll)
 {
     board.GetSquareAtPosition(currentPlayer.Location).ApplyEffect(board, currentPlayer, roll);
 }