public DrawGameBoard3D(Game game, GameBoard gameBoard)
     : base(game)
 {
     ourGame = (SettlersOfCatan)game;
     socGameBoard = (GameBoard)gameBoard;
     screenWidth = ourGame.width;
     screenHeight = ourGame.height;
     screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight);
 }
示例#2
0
        public LongestRoad(SettlersOfCatan game, PlayingState state)
        {
            OurGame = (SettlersOfCatan)game;
            playingState = (PlayingState)state;
            roadBoard= OurGame.gameBoard;

            leftTotal = 0;
            rightTotal = 0;
        }
示例#3
0
        public Player(int num, GameBoard gb)
        {
            gameBoard = gb;

            playerNumber = num;
            hiddenVictoryPoints = 0;
            victoryPoints = 0;
            roads = 0;
            longestRoad = 0;
            knights = 0;
            brick = 0;
            wheat = 0;
            wood = 0;
            wool = 0;
            ore = 0;
            for (int i = 0; i < 9; i++)
            {
                devCards[i] = 0;
            }
            for (int i = 0; i < 9; i++)
            {
                cardsAvailable[i] = 0;
            }

            canRollDice = false;
            canTrade = false;
            canBuild = false;
            canEndTurn = false;

            settlementPieces = 0;
            cityPieces = 0;
            roadPieces = 0;

            totalResources = ResourceSum();
            canBuildRoad = CanBuildRoad();
            canBuildSettlement = CanBuildSettlement();
            canBuildCity = CanBuildCity();
            canBuildDevCard = CanBuildDevCard();

            hasThree = false;
            hasBrick = false;
            hasWool = false;
            hasGrain = false;
            hasLumber = false;
            hasOre = false;

            largestArmy = false;
        }
示例#4
0
 private Boolean CanBuildSettlement(GameBoard gameBoard)
 {
     Boolean canBuild = false;
     if (brick > 0 && wood > 0 && wheat > 0 && wool > 0 && settlementPieces < 5)
     {
         List<GameNode> settleToBuild = gameBoard.placesForSettlements(this);
         if (settleToBuild.Count > 0)
             canBuild = true;
     }
     return canBuild;
 }
示例#5
0
 private Boolean CanBuildCity(GameBoard gameBoard)
 {
     Boolean canBuild = false;
     if (settlementPieces > 0 && ore > 2 && wheat > 1 && cityPieces < 4)
     {
         List<GameNode> cityToBuild = gameBoard.placesForCities(this);
         if (cityToBuild.Count > 0)
             canBuild = true;
     }
     return canBuild;
 }