Skip to content

Commit e99648b

Browse files
committed
Srtufffff
1 parent 1551722 commit e99648b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/com/group/golf/ai/GeneticBot.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ public GeneticBot(Course course, Ball ball) {
6060
@Override
6161
public void makeMove() {
6262
if (this.counter <= this.winner.getLastMove()) {
63-
if (this.winner.getLandings()[this.counter+1].equals(this.winner.getLandings()[this.counter])) {
63+
if (this.counter < this.winner.getLandings().length &&
64+
this.winner.getLandings()[this.counter+1].equals(this.winner.getLandings()[this.counter])) {
6465
this.counter++;
6566
}
6667
JVector2 currentShot = this.winner.getGenes()[this.counter];

0 commit comments

Comments
 (0)