Adilol

Hardcoding (may be a bit naff)

Sep 11th, 2011
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1.  
  2.  
  3. if (quest1 == true){level++;}
  4. cout << "You have levelled up!\n";
  5. cout << "Select which attributes you would like to increase.\n";
  6.  
  7. int choice = 0;
  8. while choice(!=3)
  9. cin >> choice;
  10. {
  11. switch(choice){
  12. case 1:
  13. { cout << "Level up strength!\n";
  14. strength++;
  15. break;
  16. }
  17. case 2:{ cout << "Level up intelligence!\n";
  18. intelligence++;
  19. break;
  20. }
  21. case 3:{ cout << "Level up magic!\n";
  22. magic++;
  23. break;
  24. }
  25. default:
  26. { cout << "Invalid selection!\n";
  27. break;
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment