コード例 #1
0
ファイル: RLEnvironment.cs プロジェクト: pmpailis/RLMonopoly
 //Set the board variable ( represents info for every position of the board)
 public void setBoard(Board b)
 {
     this.board = b;
 }
コード例 #2
0
ファイル: RLEnvironment.cs プロジェクト: pmpailis/RLMonopoly
        //Initiliaze game parameters
        private void initGameParameters()
        {
            chanceCards = new List<CommandCard>();
            communityChestCards = new List<CommandCard>();

            gameCards = new List<PropertyCard>();
            gameCommandCards = new List<CommandCard>();

            currentHotels = 0;
            currentHouses = 0;

            currentPosition = 0;
            currentPlayer = 0;

            doublesInRow = 0;

            board = new Board();

            //Both CommandCards and PropertyCards implement the Card interface
            //Set Command Cards ( both Community Chest and Chance cards )
            initMethods.setCommandsCards();

            //Set Property Cards
            initMethods.setPropertyCards();

            //Create information for every position on board
            initMethods.setBoard();

            getOutOfJailTries = new int[currentPlayers];
            playerMoves = new int[currentPlayers];

            //Initialize arrays
            for (int i = 0; i < properties.Length; i++)
            { properties[i] = -1; buildings[i] = 0; }

            //Initialize array
            for (int i = 0; i < gameCardsGroup.Length; i++)
                completedGroups[i] = -1;

            for (int i = 0; i < gamePlayers.Count; i++)
            { getOutOfJailTries[i] = 0; playerMoves[i] = 1; }
        }