One problem is this:
while(hp1 >= 0 || hp2 >= 0);
In order for this loop to terminate hp1 < 0 AND hp2 < 0. After the loop, you check hp1 first, so player two will always win.
Instead try...
Type: Posts; User: failure67
One problem is this:
while(hp1 >= 0 || hp2 >= 0);
In order for this loop to terminate hp1 < 0 AND hp2 < 0. After the loop, you check hp1 first, so player two will always win.
Instead try...