Now let's work on the print() method. Here's what we need: a) display a rectangle of dots, whose dimensions is width x height; b) represent the body of the snake with an "x"; c) draw the snake's head with an "X".
Snake (part 14)
You must be signed in to leave a comment
23 December 2021, 18:11
"Display it on the screen" Don't panic like I did. They don't mean in the JFrame (at least not yet). Just in the console output like everything else you've done before.
11 October 2021, 08:23
make sure you don't mix up x(width) and y(height) like I did.
28 October 2020, 12:10
Why would you want to do this with an int array and convert when you could just do this with a String array?