From 6c28d6e35858c4aa841f04f1f143de8f9072519c Mon Sep 17 00:00:00 2001 From: Illia Soloviov <74905269+wav3solo@users.noreply.github.com> Date: Mon, 8 Jan 2024 02:05:07 +0100 Subject: [PATCH] made string moves private --- src/SnakeBot.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SnakeBot.java b/src/SnakeBot.java index f594f83..91a7d90 100644 --- a/src/SnakeBot.java +++ b/src/SnakeBot.java @@ -11,7 +11,7 @@ * Die besten acht Teams qualifizieren sich für die Königsdisziplin „Rumble“. */ public class SnakeBot extends Bot{ - String moves = ""; + private String moves = ""; private int spiralNumber = 0; private boolean goesForward = true; private boolean ignoreStones = false; @@ -115,6 +115,7 @@ public class SnakeBot extends Bot{ } private char goToStone(View view) { + int rowDifference = findStoneRow(view) - (view.width / 2); return rowDifference < 0 ? '^' : '<'; } @@ -173,4 +174,5 @@ public class SnakeBot extends Bot{ moves = moves.substring(1); return nextMove; } + }