Open
0
Snake and ladder game using java collections
I want to develop a simple snake and ladder game using java collections need to know which data structure would be the best choice to do? Why ?
1 Answer
+ 1
How about class stone. From it an apple and part of the snake can come out. The snake can then be created as an array of objects. The properties like appearance motion and methods for collisions with apple, the walls and itself are implemented in the class for this purpose.