Пример #1
0
 internal static void putTheTiles(int _to, Player currentPlayer, Board board)
 {
     if (board.SpotsOnBoard[_to].color == Color.returnOpposite(currentPlayer.color))
     {
         board.addJailNumber(currentPlayer.color);
         board.SpotsOnBoard[_to].numberOfTiles--;
     }
     board.SpotsOnBoard[_to].color = currentPlayer.color;
     board.subJailNumber(currentPlayer.color);
     board.SpotsOnBoard[_to].numberOfTiles++;
 }
Пример #2
0
        internal static void putTheTiles(OneStep chose, Player currentPlayer, Player Opponent, Board board)
        {
            if (currentPlayer.color == Color.returnOpposite(board.SpotsOnBoard[chose._to].color))
            {
                board.addJailNumber(currentPlayer.color);
                Opponent.isInTheLastZone = false;
            }

            if (board.SpotsOnBoard[chose._to].color != board.SpotsOnBoard[chose._from].color)
            {
                board.SpotsOnBoard[chose._to].color         = currentPlayer.color;
                board.SpotsOnBoard[chose._to].numberOfTiles = 1;
            }
            else
            {
                board.SpotsOnBoard[chose._to].numberOfTiles++;
            }

            if (--(board.SpotsOnBoard[chose._from].numberOfTiles) == 0)
            {
                board.SpotsOnBoard[chose._from].color = Color.color.empty;
            }
        }