-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
298 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,4 @@ out/ | |
|
||
### Debug stuff ### | ||
.debug | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
package io.skyshard.configuration; | ||
|
||
import java.awt.*; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.awt.*; | ||
|
||
@Configuration | ||
public class RobotConfig { | ||
|
||
/** | ||
* Create a singleton robot, the robot is used for moving the mouse pointer as well as keyboard | ||
* inputs. | ||
*/ | ||
@Bean | ||
public Robot robot() { | ||
/** | ||
* Create a singleton robot, the robot is used for moving the mouse pointer as well as keyboard | ||
* inputs. | ||
*/ | ||
@Bean | ||
public Robot robot() { | ||
|
||
try { | ||
final var robot = new Robot(); | ||
robot.setAutoWaitForIdle(true); | ||
try { | ||
final var robot = new Robot(); | ||
robot.setAutoWaitForIdle(true); | ||
|
||
return robot; | ||
} catch (final Exception exception) { | ||
throw new RuntimeException(exception.getMessage()); | ||
return robot; | ||
} catch (final AWTException exception) { | ||
throw new RuntimeException(exception.getMessage()); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/java/io/skyshard/exceptions/MissingTemplateException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.skyshard.exceptions; | ||
|
||
public class MissingTemplateException extends RuntimeException { | ||
|
||
public MissingTemplateException() { | ||
super("Unable to find a template to match on. Exiting..."); | ||
} | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
src/main/java/io/skyshard/exceptions/UnsupportedSystemException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package io.skyshard.exceptions; | ||
|
||
public class UnsupportedSystemException extends RuntimeException { | ||
|
||
public UnsupportedSystemException() { | ||
super("Attempting to run on an unsupported system. Exiting..."); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ | |
|
||
public interface AttackService { | ||
|
||
void attack(Target target); | ||
void attack(Target target); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
package io.skyshard.services; | ||
|
||
import io.skyshard.domain.Target; | ||
import org.opencv.core.Mat; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
import org.opencv.core.Mat; | ||
|
||
public interface FindTargetService { | ||
|
||
List<Target> findMultipleTarget(Mat source); | ||
List<Target> findMultipleTarget(Mat source); | ||
|
||
Optional<Target> findSingleTarget(Mat source); | ||
|
||
Optional<Target> findSingleTarget(Mat source); | ||
} |
Oops, something went wrong.