In this mock RPG i made, I allow the option of attack or magic. in the fighter class...the magic stat is less than the strength stat and yet the magic attacks do significantly more than attack attacks when you actually run the program and I am mystified. Here is the snippet of code. (I wanted to attach the program but you cannot attach zip files. Is there a way to make some kind of special file with eclipse that another eclipse editor can open the entire project?)
You'll have a better chance of getting help if you can provide an SSCCE that has just enough code to demonstrate your problem and nothing else, and show clearly and precisely what behavior your expected and what you saw instead.
brent carter wrote:Is there a way to make some kind of special file with eclipse that another eclipse editor can open the entire project?)
There's no need for that. Folks won't be inclined to deal with an entire project anyway. You need to narrow down the source of the problem enough that a small snippet of code (ideally an SSCCE) is sufficient to demonstrate it.
It's the dreaded Copy-Paste-Forget-To-Change antipattern!
Joined: Dec 15, 2011
Guys what I have recently been learning to do is make a generic class and extending other classes of different enemies from the first class, making it so i only have to write everything one time and it makes the code look much nicer as well. Now if i could only stop playing the new star wars game I may actually get some work done!