* Get plain JavaScript representation of the game state. * * @return An object with two keys: * - s: {Array<[number, number]>} representing the squares occupied by * the snake. The array is ordered in such a way that the first * element corresponds to the head of the s
()
| 317 | * the fruit(s). |
| 318 | */ |
| 319 | getState() { |
| 320 | return { |
| 321 | "s": this.snakeSquares_.slice(), |
| 322 | "f": this.fruitSquares_.slice() |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | /** |
no outgoing calls
no test coverage detected