Skip to content

Commit 5861ff3

Browse files
committed
Fixed fast draw target not centered properly bug
1 parent d8066dd commit 5861ff3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,16 @@
33
# Mobile Tools for Java (J2ME)
44
.mtj.tmp/
55

6+
# Eclipse files
7+
.classpath
8+
.project
9+
.settings
10+
611
# Package Files #
712
*.jar
813
*.war
914
*.ear
1015

1116
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
1217
hs_err_pid*
18+
/bin/

src/main/java/com/shootoff/plugins/CowboyFastDraw.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public void addThreeBTarget() {
8888

8989
// Center the target
9090
Dimension2D d = threeB.getDimension();
91-
final double x = (getArenaWidth() / 2) - d.getWidth();
92-
final double y = (getArenaHeight() / 2) - d.getHeight();
91+
final double x = (getArenaWidth() / 2) - (d.getWidth() / 2);
92+
final double y = (getArenaHeight() / 2) - (d.getHeight() / 2);
9393
threeB.setPosition(x, y);
9494

9595
// Find the light
@@ -145,7 +145,7 @@ public void targetUpdate(Target target, TargetChange change) {
145145

146146
@Override
147147
public ExerciseMetadata getInfo() {
148-
return new ExerciseMetadata("Cowboy Fast Draw", "1.0", "phrack",
148+
return new ExerciseMetadata("Cowboy Fast Draw", "1.1", "phrack",
149149
"Simulates Cowboy Fast Draw #3B targets and timers in practice mode.");
150150
}
151151

0 commit comments

Comments
 (0)