We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1551722 commit e99648bCopy full SHA for e99648b
core/src/com/group/golf/ai/GeneticBot.java
@@ -60,7 +60,8 @@ public GeneticBot(Course course, Ball ball) {
60
@Override
61
public void makeMove() {
62
if (this.counter <= this.winner.getLastMove()) {
63
- if (this.winner.getLandings()[this.counter+1].equals(this.winner.getLandings()[this.counter])) {
+ if (this.counter < this.winner.getLandings().length &&
64
+ this.winner.getLandings()[this.counter+1].equals(this.winner.getLandings()[this.counter])) {
65
this.counter++;
66
}
67
JVector2 currentShot = this.winner.getGenes()[this.counter];
0 commit comments