MCPcopy Create free account
hub / github.com/Semaserg/LeetCodeProblems / move

Method move

design/SnakeGame_353/SnakeGame.java:86–111  ·  view source on GitHub ↗

Moves the snake. @param direction - 'U' = Up, 'L' = Left, 'R' = Right, 'D' = Down @return The game's score after the move. Return -1 if game over. Game over when snake crosses the screen boundary or bites its body.

(String direction)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainMethod · 0.95

Calls 5

isFoodMethod · 0.95
removeNextFoodMethod · 0.95
isBodyCrashMethod · 0.95
isBoundaryCrashMethod · 0.95
getFirstMethod · 0.80

Tested by

no test coverage detected