-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #121 from EntelectChallenge/develop
Release 3.0.2
- Loading branch information
Showing
19 changed files
with
138 additions
and
30 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
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
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
16 changes: 16 additions & 0 deletions
16
game-runner/src/main/java/za/co/entelect/challenge/entities/BotArguments.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,16 @@ | ||
package za.co.entelect.challenge.entities; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
public class BotArguments { | ||
@SerializedName("coreCount") | ||
private int coreCount; | ||
|
||
public BotArguments(int coreCount) { | ||
this.coreCount = coreCount; | ||
} | ||
|
||
public int getCoreCount() { | ||
return this.coreCount; | ||
} | ||
} |
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 |
---|---|---|
|
@@ -24,3 +24,39 @@ Haskell creates native binaries so you can simply run: | |
``` | ||
|
||
from the command line to invoke the bot program. | ||
|
||
## Running the Bot with Multiple Threads | ||
In order to run the Haskell bot with multiple threads (and possibly | ||
cores) you need to change the bot configuration to inform the runner | ||
to supply the appropriate runtime arguments. The following is an | ||
example "bot.json" for launching the bot with 2 threads: | ||
|
||
``` | ||
{ | ||
"author": "John Doe", | ||
"email": "[email protected]", | ||
"nickName": "a-bot", | ||
"botLocation": "/bin", | ||
"botFileName": "EntelectChallenge2018-exe", | ||
"botLanguage": "haskell", | ||
"arguments": { | ||
"coreCount": 2 | ||
} | ||
} | ||
``` | ||
|
||
You should also ensure that the executable is built with the | ||
"-rtsopts" and "-threaded" compile time flags. These are supplied | ||
under the "executables" section in "package.yaml". e.g. | ||
|
||
``` | ||
executables: | ||
EntelectChallenge2018-exe: | ||
main: Main.hs | ||
source-dirs: app | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
dependencies: | ||
- EntelectChallenge2018 | ||
``` |
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,5 +1,5 @@ | ||
default: | ||
java -jar tower-defence-runner-3.0.1.jar | ||
java -jar tower-defence-runner-3.0.2.jar | ||
|
||
run: | ||
java -jar tower-defence-runner-3.0.1.jar | ||
java -jar tower-defence-runner-3.0.2.jar |
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,2 +1,2 @@ | ||
java -jar tower-defence-runner-3.0.1.jar | ||
java -jar tower-defence-runner-3.0.2.jar | ||
pause |
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 |
---|---|---|
|
@@ -24,3 +24,39 @@ Haskell creates native binaries so you can simply run: | |
``` | ||
|
||
from the command line to invoke the bot program. | ||
|
||
## Running the Bot with Multiple Threads | ||
In order to run the Haskell bot with multiple threads (and possibly | ||
cores) you need to change the bot configuration to inform the runner | ||
to supply the appropriate runtime arguments. The following is an | ||
example "bot.json" for launching the bot with 2 threads: | ||
|
||
``` | ||
{ | ||
"author": "John Doe", | ||
"email": "[email protected]", | ||
"nickName": "a-bot", | ||
"botLocation": "/bin", | ||
"botFileName": "EntelectChallenge2018-exe", | ||
"botLanguage": "haskell", | ||
"arguments": { | ||
"coreCount": 2 | ||
} | ||
} | ||
``` | ||
|
||
You should also ensure that the executable is built with the | ||
"-rtsopts" and "-threaded" compile time flags. These are supplied | ||
under the "executables" section in "package.yaml". e.g. | ||
|
||
``` | ||
executables: | ||
EntelectChallenge2018-exe: | ||
main: Main.hs | ||
source-dirs: app | ||
ghc-options: | ||
- -threaded | ||
- -rtsopts | ||
dependencies: | ||
- EntelectChallenge2018 | ||
``` |
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
Binary file renamed
BIN
+9.87 MB
starter-pack/tower-defence-runner-3.0.1.jar → starter-pack/tower-defence-runner-3.0.2.jar
Binary file not shown.