Mike orr wrote:first thanks for the edit greg, i will be sure to do that in the future.
second i knew there was something i was forgetting with strings and comparing them. so i should use yep that seems to work much better!
Little tip for you: when comparing with
String literals, it's quite a good idea to invert the comparison, ie:
if ("Elf".equals(player.race))
instead of
if (player.race.equals("Elf"))
because then you don't get a NullPointerException if
player.race is null.
Oh, and you almost NEVER want to put a semicolon after an
if statement.
BIG tip for you: Separate your GUI code from your game logic
completely - or as far as you possibly can. GUI code should ONLY be concerned with display and interaction; it shouldn't be doing
any calculations - and that includes stats updates. Keep all that stuff separate and simply hand back results for your GUI to display.
HIH
Winston