as for the holidays I decided to give myself a little break from gaining JAVA knowledge I decided to create a little program to strengthen my knowledge that I already have.
If you read the code below, do not think that I want to be a game designer of some sort, but from my point of view this was a very familiar topic to get my head around, so I decided to create a little "RPG fighting engine".
This one is by no means complete, but I am happy that it at least works somehow
Sorry to appear negative, but I am afraid I can't see any object orientation in the design. Where are you creating a new Engine object (or Fighter object)? Why have you got so much code in the main() method?
Don't write println(...) repeatedly if you can combine several instructions into one printf(...) call. Remember you can replace println() with no argments by System.out.printf("...%n...").
Why are you using so many continues and breaks?
Only criticism makes us better. So thanks for sharing it.
For the object orientation I can say that I was simply sloppy. For the other parts I just do not know better. I have been working on java for the past 3 weeks only next to my job. So you can say that I am a bloody noob with no hands on experience. But I will improve the code. Thanks again for sharing
Campbell Ritchie wrote:And I would put the main method in a class all of its own, called GameDemo or similar.
Means having a class GameDemo with main method and from the main method calling the static methods of this class? If so, then it sounds similar to what I was thinking of when I talked about Helper Class.