Snake (part 14)

  • 24
  • Locked
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".
You can't complete this task, because you're not signed in.
Comments (3)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 38 , Greenfield, USA, United States
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.
Jurij Thmsn
Level 29 , Flensburg, Germany
11 October 2021, 08:23
make sure you don't mix up x(width) and y(height) like I did.
Switch/Cypher
Level 25 , Bexleyheath, United Kingdom
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?