OOP Snake game, multiple classes

()
Last edited on
The problem is that the snake does not know the map area.
One way to fix it is to pass a pointer of type map to the snake
or probably better
give the snake a x and y position position only;

I also would create a Game class that has the map, snake, score classes.

A good tool for OOP design are CRC Cards.
http://c2.com/doc/oopsla89/paper.html
https://www.youtube.com/watch?v=otKUer13HnA
()
Last edited on
Topic archived. No new replies allowed.