Skip to content

Commit

Permalink
fix: incorrect loop range in ai
Browse files Browse the repository at this point in the history
  • Loading branch information
Rapiz1 committed Nov 21, 2020
1 parent 74c5544 commit 344cff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void AiInput(Snake* snake) {
if (count) {
int maxValue = choices[0].value;
int nowChoice = 0;
for (int i = 1; i < 4; i++) {
for (int i = 0; i < count; i++) {
if (choices[i].value > maxValue) {
maxValue = choices[i].value;
nowChoice = i;
Expand Down

0 comments on commit 344cff1

Please sign in to comment.