コード例 #1
0
ファイル: Player.cs プロジェクト: rroethle/LemonadeStand-C
        public Player(string name, string location)
        {
            Stand stand = new Stand(location);

            this.playerName = name;
            this.stand      = stand;
        }
コード例 #2
0
 //Constructor
 public Game()
 {
     myRecipe      = new LemonadeRecipe();
     lemonadeStand = new Stand();
     player1       = new Player();
     store         = new Store();
     today         = new Day();
 }
コード例 #3
0
 // constructor
 public Game()
 {
     dayCounter    = 1;
     numberOfDays  = 7;
     today         = new Day();
     theStore      = new Store();
     lemonadeStand = new Stand();
 }
コード例 #4
0
        //constructor

        public Game()
        {
            thisDay      = new Day();
            dayCounter   = 1;
            numberOfDays = 7;
            theStore     = new Store();
            player       = new Player();
            customers    = new List <Customer>();
            moneyToStart = 25.00;
            theStand     = new Stand();
            inventory    = new Inventory();
            moneyMade    = 0.00;
        }
コード例 #5
0
ファイル: Customer.cs プロジェクト: rroethle/LemonadeStand-C
        public Customer(Weather weather, float price, Player player, Stand stand)
        {
            if (player.PlayerName != "Tad from Prep School" && stand.location != "The Hamptons")
            {
                this.weatherDemand = weather.DemandLevel;
                if (price <= levelOneBuyPrice)
                {
                    buyChance = (levelOneBuyChance);
                }
                else if (price <= levelTwoBuyPrice)
                {
                    buyChance = (levelTwoBuyChance);
                }
                else if (price <= levelThreeBuyPrice)
                {
                    buyChance = (levelThreeBuyChance);
                }
                else if (price <= levelFourBuyPrice)
                {
                    buyChance = (levelFourBuyChance);
                }

                else if (price <= levelFiveBuyPrice)
                {
                    buyChance = (levelFiveBuyChance);
                }
                else
                {
                    buyChance = (defaultBuyChance);
                }
            }
            else
            {
                buyChance = guaranteedBuy;
            }
        }
コード例 #6
0
ファイル: Customer.cs プロジェクト: rroethle/LemonadeStand-C
        public Customer(Weather weather, float price, Player player, Stand stand)
        {
            if (player.PlayerName != "Tad from Prep School" && stand.location != "The Hamptons")
            {
                this.weatherDemand = weather.DemandLevel;
                if (price <= levelOneBuyPrice)
                {
                    buyChance = (levelOneBuyChance);
                }
                else if (price <= levelTwoBuyPrice)
                {
                    buyChance = (levelTwoBuyChance);
                }
                else if (price <= levelThreeBuyPrice)
                {
                    buyChance = (levelThreeBuyChance);
                }
                else if (price <= levelFourBuyPrice)
                {
                    buyChance = (levelFourBuyChance);
                }

                else if (price <= levelFiveBuyPrice)
                {
                    buyChance = (levelFiveBuyChance);
                }
                else
                {
                    buyChance = (defaultBuyChance);
                }
            }
            else
            {
                buyChance = guaranteedBuy;
            }
        }
コード例 #7
0
 public Player()
 {
     stand = new Stand();
     money = startingMoney - 50;
 }