Skip to content

Commit c4b6ce7

Browse files
authored
Merge pull request #176 from jCodingStuff/FixDumbBot
Fixed DumbBot
2 parents a813f41 + 9dccd58 commit c4b6ce7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class DumBot implements Bot {
2121

2222
private static final float A_SCALAR = 15;
2323
private static final float F_SCALAR = 2;
24-
private static final float BIG_SCALAR = 30;
24+
private static final float BIG_SCALAR = (float) 0.935;
2525

2626
private final Course course;
2727
private final Ball ball;
@@ -49,7 +49,7 @@ public void setPhysics(Physics physics) {
4949
*/
5050
@Override
5151
public void makeMove() {
52-
double extraPower = 6.5;
52+
double extraPower = 2;
5353
double distanceLimit = 0.75;
5454
float[] goalCoords = this.course.getGoal();
5555
float[] distances = new float[] {goalCoords[0]-this.ball.getX(), goalCoords[1]-this.ball.getY()};
@@ -77,7 +77,7 @@ public void makeMove() {
7777
distances[0] *= BIG_SCALAR;
7878
distances[1] *= BIG_SCALAR;
7979
this.scale(distances);
80-
this.engine.hit(ball,distances[0] / 15, distances[1] / 15);
80+
this.engine.hit(ball,distances[0], distances[1]);
8181
}
8282

8383
/**

0 commit comments

Comments
 (0)