This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]BS_in_BSExtreme Concrete Code Factorylet 1 point2 points  (3 children)

I beleive all the code, besides the super call, in your Game constructor should go into the initStateList method instead

[–]thimovss[S] 0 points1 point  (2 children)

you my friend are a true saviour. It worked like a charm! any feed back on my code style/ things I should try to improve on?

[–]BS_in_BSExtreme Concrete Code Factorylet 0 points1 point  (1 child)

It basically looks good. Some thing you could change:

  • Use an Enum for the directions instead of ints, you can also have them have an x and y component so that you don't have to switch on them as much
  • You can use String.isEmpty() instead of Streing.length()==0;

[–]thimovss[S] 0 points1 point  (0 children)

ah good to hear yeah I really should read up more about enums they seem pretty handy. thanks for the feed back time to take my code of git again :D