Example #1
0
        public void Play(int guessNumber)
        {
            Cpu.rand(1, 10);
            var number = Ram.LoadValue();

            if (number + 1 != guessNumber + 1)
            {
                VideoCard.Draw(string.Format("You didn't guess the number {0}.", number));
            }
            else
            {
                VideoCard.Draw("You win!");
            }
        }
Example #2
0
        internal void ChargeBattery(int percentage)
        {
            battery.Charge(percentage);

            VideoCard.Draw(string.Format("Battery status: {0}", battery.Percentage));
        }
        public void ChargeBattery(int percentage)
        {
            this.LaptopBattery.Charge(percentage);

            VideoCard.Draw(string.Format(BatteryChargedMessage, LaptopBattery.Percentage));
        }