Let's tackle the main method.
First, you need to create a static Room game field in the Room class. The variable should be accessible from all classes.
Now in the main method:
a) Create the snake, a Snake object.
b) Create the room, a Room object, and pass the width, height, and snake to it.
Snake (part 10)
- 6
Locked
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Michaela Obertova
15 November 2022, 14:10
For anyone struggling with the first three requirements: what the task description doesn't say explicitly is that you are technically allowed to use whatever values you want when initializing the objects.
0