View Single Post
Old 06-13-2007, 05:34 PM   #1 (permalink)
PnkFloyd27
 
True Techie

Join Date: Nov 2006

Posts: 111

PnkFloyd27

Default Help with objects in Java

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.
PnkFloyd27 is offline