SnakeBot reformat

This commit is contained in:
Your Average Code 2024-01-25 18:05:13 +01:00
parent a242381a9d
commit e408032f5d

View File

@ -8,8 +8,8 @@ public class SnakeBot extends Bot {
protected int steps = 0;
public static void main(String[] args) {
Bot bot = new SnakeBot(args);
bot.run();
Bot bot = new SnakeBot(args);
bot.run();
}
protected SnakeBot(String[] args) {
@ -72,10 +72,8 @@ public class SnakeBot extends Bot {
int rightStars = 0;
for (int x = 0; x < size / 2; x++) {
for (int y = 0; y < size; y++) {
if (grid[x][y] == '*')
leftStars++;
if (grid[size - x - 1][y] == '*')
rightStars++;
if (grid[x][y] == '*') leftStars++;
if (grid[size - x - 1][y] == '*') rightStars++;
}
}