Skip to content

Commit 2d0ab06

Browse files
Merge pull request #5 from AngelsCheeseBurgerOrg/develop
Fix Bug that only place 1px of move always. Set the parameter pixel as set mouse movement. Create Interface distinction between readonly and writeonly functions interface to maintain application argument correct referencing and use of it on any class. Fix folder path on pom.xml when copying the .bat file. Update the READ.md to place my name as primary author
2 parents 2791267 + 471835b commit 2d0ab06

13 files changed

+88
-27
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,9 @@ License
9898

9999
CC0-1.0 License
100100

101+
Author
102+
----
103+
104+
by: Ryan Seth Roldan
101105

102106
**Free Angellic Software, Yeah! **

pom.xml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.angelssoftware</groupId>
66
<artifactId>makeamove-site</artifactId>
7-
<version>0.0.1-SNAPSHOT</version>
7+
<version>1.0.1-SNAPSHOT</version>
88
<packaging>jar</packaging>
99
<name>Make a Move</name>
1010
<description>Dont make your computer Idle</description>
@@ -31,6 +31,19 @@
3131

3232
<plugins>
3333

34+
<!-- Force Author Ship -->
35+
<plugin>
36+
<artifactId>maven-javadoc-plugin</artifactId>
37+
<groupId>org.apache.maven.plugins</groupId>
38+
<version>2.10.3</version>
39+
<configuration>
40+
<fixTags>author</fixTags>
41+
<force>true</force>
42+
<fixFieldComment>false</fixFieldComment>
43+
<fixMethodComment>false</fixMethodComment>
44+
</configuration>
45+
</plugin>
46+
3447
<!-- Always clean project first -->
3548
<plugin>
3649
<artifactId>maven-clean-plugin</artifactId>
@@ -74,10 +87,8 @@
7487
</executions>
7588
</plugin>
7689

77-
<!--
78-
Try to Auto generate the script batch file to execute
79-
the Runnable Jar
80-
-->
90+
<!-- Try to Auto generate the script batch file to execute the Runnable
91+
Jar -->
8192
<plugin>
8293
<groupId>org.apache.maven.plugins</groupId>
8394
<artifactId>maven-resources-plugin</artifactId>
@@ -90,10 +101,10 @@
90101
<goal>copy-resources</goal>
91102
</goals>
92103
<configuration>
93-
<outputDirectory>${basedir}/target/</outputDirectory>
104+
<outputDirectory>${basedir}/target</outputDirectory>
94105
<resources>
95106
<resource>
96-
<directory>${basedir}/target/classes/</directory>
107+
<directory>${basedir}/target/classes</directory>
97108
<includes>
98109
<include>run_make_a_move.bat</include>
99110
</includes>

src/org/angelssoftware/classes/MousePointerMover.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import org.angelssoftware.interfaces.RobotActionInterface;
99
import org.angelssoftware.interfaces.RobotMouseInterface;
10+
import org.angelssoftware.interfaces.readonly.RobotMouseInterfaceReadOnly;
1011
import org.angelssoftware.models.RobotProperties;
1112
import org.angelssoftware.structures.ScreenSize;
1213

@@ -19,7 +20,7 @@ public MousePointerMover() throws AWTException {
1920
commonInitialization();
2021
}
2122

22-
public MousePointerMover(RobotMouseInterface robotProperties) throws AWTException {
23+
public MousePointerMover(RobotMouseInterfaceReadOnly robotProperties) throws AWTException {
2324
commonInitialization();
2425
this.setMouseHopInPx(robotProperties.getMouseHopInPx());
2526
this.setMoveDirection(robotProperties.getMoveDirection());
@@ -39,22 +40,22 @@ private void MakeTheMousePointerMove() {
3940

4041
switch(getMoveDirection()) {
4142
case UP:
42-
mpY = mpY - 1;
43+
mpY = mpY - getMouseHopInPx();
4344
if(mpY<0) mpY = 1;
4445
if(mpX<0) mpX = 0;
4546
break;
4647
case DOWN:
47-
mpY = mpY + 1;
48+
mpY = mpY + getMouseHopInPx();
4849
if(mpY>getMaxHeight()) mpY = getMaxHeight() - 1;
4950
if(mpX<0) mpX = 0;
5051
break;
5152
case LEFT:
52-
mpX = mpX - 1;
53+
mpX = mpX - getMouseHopInPx();
5354
if(mpX<0) mpX = 1;
5455
if(mpY<0) mpY = 0;
5556
break;
5657
case RIGHT:
57-
mpX = mpX + 1;
58+
mpX = mpX + getMouseHopInPx();
5859
if(mpX>getMaxWidth()) mpX = getMaxWidth() - 1;
5960
if(mpY<0) mpY = 0;
6061
break;

src/org/angelssoftware/classes/RobotAutomation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import java.util.TimerTask;
77

88
import org.angelssoftware.interfaces.RobotActionInterface;
9-
import org.angelssoftware.models.ApplicationArgumentModel;
9+
import org.angelssoftware.interfaces.readonly.RobotInterfaceReadOnly;
1010

1111
public class RobotAutomation {
12-
private ApplicationArgumentModel applicationArgumentModel;
12+
private RobotInterfaceReadOnly applicationArgumentModel;
1313
private List<RobotActionInterface> listRobotActions;
1414

15-
public RobotAutomation(ApplicationArgumentModel applicationArgumentModel) {
15+
public RobotAutomation(RobotInterfaceReadOnly applicationArgumentModel) {
1616
this.applicationArgumentModel = applicationArgumentModel;
1717
this.listRobotActions = new ArrayList<RobotActionInterface>();
1818
}
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package org.angelssoftware.interfaces;
22

3-
public interface RobotInterface extends
4-
RobotPropertiesInterface,
5-
RobotMouseInterface {
3+
import org.angelssoftware.interfaces.readonly.RobotInterfaceReadOnly;
4+
import org.angelssoftware.interfaces.writeonly.RobotInterfaceWriteOnly;
65

6+
public interface RobotInterface extends
7+
RobotInterfaceReadOnly, RobotInterfaceWriteOnly {
78
}
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package org.angelssoftware.interfaces;
22

3-
import org.angelssoftware.structures.MoveDirection;
3+
import org.angelssoftware.interfaces.readonly.RobotMouseInterfaceReadOnly;
4+
import org.angelssoftware.interfaces.writeonly.RobotMouseInterfaceWriteOnly;
5+
6+
public interface RobotMouseInterface extends RobotMouseInterfaceReadOnly, RobotMouseInterfaceWriteOnly {
7+
48

5-
public interface RobotMouseInterface {
6-
public int getMouseHopInPx();
7-
public void setMouseHopInPx(int mouseHopInPx);
8-
public MoveDirection getMoveDirection();
9-
public void setMoveDirection(MoveDirection moveDirection);
109
}
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package org.angelssoftware.interfaces;
22

3-
public interface RobotPropertiesInterface {
4-
public int getTimeDelayInMillis();
5-
public void setTimeDelayInMillis(int timeDelayInMillis);
3+
import org.angelssoftware.interfaces.readonly.RobotPropertiesInterfaceReadOnly;
4+
import org.angelssoftware.interfaces.writeonly.RobotPropertiesInterfaceWriteOnly;
5+
6+
public interface RobotPropertiesInterface extends RobotPropertiesInterfaceReadOnly, RobotPropertiesInterfaceWriteOnly{
7+
68
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package org.angelssoftware.interfaces.readonly;
2+
3+
4+
public interface RobotInterfaceReadOnly extends
5+
RobotPropertiesInterfaceReadOnly,
6+
RobotMouseInterfaceReadOnly {
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package org.angelssoftware.interfaces.readonly;
2+
3+
import org.angelssoftware.structures.MoveDirection;
4+
5+
public interface RobotMouseInterfaceReadOnly {
6+
public int getMouseHopInPx();
7+
public MoveDirection getMoveDirection();
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package org.angelssoftware.interfaces.readonly;
2+
3+
public interface RobotPropertiesInterfaceReadOnly {
4+
public int getTimeDelayInMillis();
5+
}

0 commit comments

Comments
 (0)