Skip to content

Commit 7ecd14d

Browse files
committed
Fix SimpleGameGim and add to programs list.
1 parent 467ef25 commit 7ecd14d

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

PROGRAMS

+6
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ Python console
3939
- How to run: ./gradlew pythonConsole
4040
- Description: A console for interactively running Python code via Jython.
4141
Jython is a Python implementation that runs in the JVM.
42+
43+
Simple game simulation
44+
- Main class: org.ggp.base.apps.utilities.SimpleGameSim
45+
- How to run: ./gradlew simpleGameSim
46+
- Description: Runs a play-through of a single match, to illustrate how the
47+
game server code works. See the source code for details.

build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ task server(type: JavaExec) {
121121
classpath = sourceSets.main.runtimeClasspath
122122
}
123123

124-
//This currently fails with an exception
125124
task simpleGameSim(type: JavaExec) {
126125
main = 'org.ggp.base.apps.utilities.SimpleGameSim'
127126
classpath = sourceSets.main.runtimeClasspath

src/main/java/org/ggp/base/apps/utilities/SimpleGameSim.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static void main(String[] args) throws InterruptedException {
5353
// keep them secure and hidden, and pass them to "setCryptographicKeys" in Match.
5454
// The match will then be signed using those keys. Do not use the sample keys if you
5555
// want to actually prove anything.
56-
theMatch.setCryptographicKeys(new EncodedKeyPair(FileUtils.readFileAsString(new File("src/org/ggp/base/apps/utilities/SampleKeys.json"))));
56+
theMatch.setCryptographicKeys(new EncodedKeyPair(FileUtils.readFileAsString(new File("src/main/resources/org/ggp/base/apps/utilities/SampleKeys.json"))));
5757
} catch (JSONException e) {
5858
System.err.println("Could not load sample cryptograhic keys: " + e);
5959
}

0 commit comments

Comments
 (0)