Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DoBattleWithPist(Weapon &pistol)
- {
- for (int i = 0; i <= 10; ++i)
- {
- std::cin >> shoott;
- if (shoott == "b")
- if (rand() % 100 + 1 == 51)
- {
- std::cout << "Weapon is broken, try reload.";
- }
- else
- pistol.Shot();
- if (shoott == "info" && pistol.IsEmpty() == false)
- {
- std::cout << "Weapon is not empty. Condition of weapon is Okay." << std::endl;
- i -= 1;
- }
- if (shoott == "r" && i != 0)
- {
- pistol.Reload();
- i = -1;
- }
- else if(shoott == "r" && pistol.IsEmpty() == false)
- {
- cout << "Full Magazine." << endl;
- i -= 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement