PnkFloyd27
In Runtime
- Messages
- 111
I'm new to Java and I am trying to make a robot fighting game(I know it's cheesy). What I want to do is have each robot be it's own object. I try to do something like this:
if the player's attack# is <= the robot's attack# then they win
The problem I am having is getting the player's attack number. It is in the main class but I don't know how to refer to it in the robot classes. Please help, I'll try to explain it differently if I didn't do a good job of that. Thank you.
if the player's attack# is <= the robot's attack# then they win
The problem I am having is getting the player's attack number. It is in the main class but I don't know how to refer to it in the robot classes. Please help, I'll try to explain it differently if I didn't do a good job of that. Thank you.