示例#1
0
文件: Player.cs 项目: punkah/majom
 public List<Step> DoStep(Board Board, Int32[] Roll);
示例#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;
            }
        }