COMP 2012H
Honors Object-Oriented Programming and Data Structures
Lab 1
Eclipse, Fundamentals of C++, and Program Flow Control
Common Errors
- Not careful about the boundary case. e.g., if Player 1 has only 2 health and then Player 2 uses 3 rockets to attack, the game ended with Player 1's health equals to -1 (should be 0).
- If the the program was run as a single executable program, upon the termination of the program, it exits immediately instead of pausing at the last output so that the user can not clearly see the result of the game. (Not a vital problem, just by using system("pause") or waiting for a dummy input can solve this issue.)