Beispiel #1
0
        public override string ToString()
        {
            var result        = new StringBuilder($"{base.ToString()}{NewLine}Defence: {Defence.Value}");
            var bonusesString = Bonuses.ToString();

            if (bonusesString != string.Empty)
            {
                result.Append($"{NewLine}{bonusesString}");
            }
            return(result.ToString());
        }
Beispiel #2
0
        private void AddBonus(Bonuses bonuses)
        {
            switch (bonuses)
            {
            case Bonuses.bomb_plus:
                countBombs++;
                //ChandeScore("+1 К БОМБЕ");
                break;

            case Bonuses.bomb_minus:
                countBombs = countBombs == 1 ? 1 : countBombs--;
                //ChandeScore("-1 К БОМБЕ");
                break;

            case Bonuses.fire_plus:
                lenFire++;
                //ChandeScore("+1 К ОГНЮ");
                break;

            case Bonuses.fire_minus:
                lenFire = lenFire == 1 ? 1 : lenFire--;
                //ChandeScore("-1 К ОГНЮ");
                break;

            case Bonuses.speed_plus:
                step++;
                //ChandeScore("+1 К СКОРОСТИ");
                break;

            case Bonuses.speed_minus:
                step = step <= 3 ? 3 : step--;
                //ChandeScore("-1 К СКОРОСТИ");
                break;

            default:
                break;
            }
            ChandeScore(bonuses.ToString());
        }
Beispiel #3
0
 public override string ToString()
 {
     return(ID + " " + Balance.ToString() + " " + Bonuses.ToString() + " ");
 }