From 7c7528cda184e6f9ff37ee943ef93604e4503aa0 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:54:10 +0200 Subject: [PATCH] fixed snake not working anymore Signed-off-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> --- src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt b/src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt index 30a343e..dd20b3f 100644 --- a/src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt +++ b/src/main/kotlin/gay/j10a1n15/sillygames/games/Snake.kt @@ -60,7 +60,7 @@ class Snake : Game(), RpcProvider { it }.toMutableList() - if (newHead in snake) { + if (newHead in snake.drop(1)) { gameOver = true } }