Skip to content

Commit

Permalink
Figured out client/server
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-meades committed Mar 10, 2020
1 parent 1cfce8f commit 9b750d7
Show file tree
Hide file tree
Showing 42 changed files with 447 additions and 59 deletions.
4 changes: 3 additions & 1 deletion Assignments/04-Stag/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assignments/04-Stag/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 50 additions & 10 deletions Assignments/04-Stag/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assignments/04-Stag/04-Stag.iml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="libs" level="project" />
<orderEntry type="library" exported="" name="libs" level="project" />
</component>
</module>
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions Assignments/04-Stag/out/production/04-Stag/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
default: build

build:
javac -classpath ./libs/dot-parser.jar:./libs/json-parser.jar:. StagServer.java

run: build
java StagServer data/entities.dot data/actions.json

clean:
rm *.class
Binary file not shown.
Binary file not shown.
36 changes: 36 additions & 0 deletions Assignments/04-Stag/out/production/04-Stag/data/actions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"actions": [

{
"triggers": ["open", "unlock"],
"subjects": ["door", "key"],
"consumed": ["key"],
"produced": ["cellar"],
"narration": "You unlock the door and see steps leading down into a cellar"
},

{
"triggers": ["chop", "cut", "cutdown"],
"subjects": ["tree", "axe"],
"consumed": ["tree"],
"produced": ["log"],
"narration": "You cut down the tree with the axe"
},

{
"triggers": ["drink"],
"subjects": ["potion"],
"consumed": ["potion"],
"produced": ["health"],
"narration": "You drink the potion and your health improves"
},

{
"triggers": ["fight", "hit", "punch", "kick", "slap", "attack", "kill"],
"subjects": ["elf"],
"consumed": ["health"],
"produced": [],
"narration": "You attack the elf, but he fights back and you lose some health"
}
]
}
45 changes: 45 additions & 0 deletions Assignments/04-Stag/out/production/04-Stag/data/entities.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
digraph layout {
/* ortho splines just makes the arrows into straight lines (rather than curvy ones !) */
splines = ortho;
node [shape = "rect"];

subgraph locations {
subgraph cluster001 {
node [shape = "none"];
start [description = "An empty room"];
subgraph artefacts {
node [shape = "diamond"];
potion [description = "Magic potion"];
}
subgraph furniture {
node [shape = "hexagon"];
door [description = "Wooden door"];
}
}

subgraph cluster002 {
node [shape = "none"];
forest [description = "A dark forest"];
subgraph artefacts {
node [shape = "diamond"];
key [description = "Brass key"];
}
}

subgraph cluster003 {
node [shape = "none"];
cellar [description = "A dusty cellar"]
subgraph characters {
node [shape = "ellipse"];
elf [description = "Angry Elf"];
}
}
}

subgraph paths {
start -> forest;
forest -> start;
cellar -> start;
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions Assignments/04-Stag/src/Artefacts.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public class Artefacts extends Entity {

}
2 changes: 2 additions & 0 deletions Assignments/04-Stag/src/Characters.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public class Characters extends Entity {
}
3 changes: 3 additions & 0 deletions Assignments/04-Stag/src/Entity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public abstract class Entity {

}
2 changes: 2 additions & 0 deletions Assignments/04-Stag/src/Furniture.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public class Furniture extends Entity {
}
7 changes: 7 additions & 0 deletions Assignments/04-Stag/src/Game.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
public class Game {
private Handler handler;

public Game() {

}
}
4 changes: 4 additions & 0 deletions Assignments/04-Stag/src/Handler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

public class Handler {

}
4 changes: 4 additions & 0 deletions Assignments/04-Stag/src/Location.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
public class Location extends Entity {


}
2 changes: 1 addition & 1 deletion Assignments/04-Stag/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build:
javac -classpath ./libs/dot-parser.jar:./libs/json-parser.jar:. StagServer.java

run: build
java -classpath ./libs/dot-parser.jar:./libs/json-parser.jar:. StagServer data/entities.dot data/actions.json
java StagServer data/entities.dot data/actions.json

clean:
rm *.class
36 changes: 0 additions & 36 deletions Assignments/04-Stag/src/ParserClass.java

This file was deleted.

Binary file modified Assignments/04-Stag/src/StagServer.class
Binary file not shown.
2 changes: 2 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assignments/Bonus/GraphPrint/.idea/description.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/libraries/libs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/project-template.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Assignments/Bonus/GraphPrint/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Assignments/Bonus/GraphPrint/GraphPrint.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="libs" level="project" />
</component>
</module>
Loading

0 comments on commit 9b750d7

Please sign in to comment.