Skip to content
Snippets Groups Projects
Commit 12f5169a authored by Piers Williams's avatar Piers Williams
Browse files

Started work updating transmission to the new format of game

parent 943c06d1
No related branches found
No related tags found
No related merge requests found
Showing
with 1020 additions and 46 deletions
......@@ -31,7 +31,7 @@
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.fossgalaxy.games.ggj2017.JamApp</mainClass>
<mainClass>com.fossgalaxy.games.ggj2017.Transmission</mainClass>
</manifest>
</archive>
</configuration>
......
package com.fossgalaxy.games.ggj2017;
import com.fossgalaxy.games.tbs.App;
import com.fossgalaxy.games.tbs.GameDef;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.ai.Controller;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.EntityType;
import com.fossgalaxy.games.tbs.entity.ResourceType;
import com.fossgalaxy.games.tbs.io.SettingsIO;
import com.fossgalaxy.games.tbs.order.Order;
import com.fossgalaxy.games.tbs.order.OrderProcessor;
import com.fossgalaxy.games.tbs.rules.Rule;
import com.fossgalaxy.games.tbs.ui.*;
import javax.swing.*;
import java.awt.*;
import java.util.Collection;
import java.util.Map;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* Hello world!
*/
public class JamApp {
public static void main(String[] args) {
String[] args1 = {"transmission.json", "bigMap.json"};
App.main(args1);
}
}
package com.fossgalaxy.games.ggj2017;
import com.fossgalaxy.games.tbs.App;
import com.fossgalaxy.games.tbs.io.SettingsIO;
/**
* Hello world!
*/
public class Transmission {
public static void main(String[] args) {
App.run(SettingsIO.buildWithExtras("com.fossgalaxy.games.ggj2017"), "transmission.json", "transmissionMap.json", "Player", "Player");
}
}
package com.fossgalaxy.games.ggj2017;
import com.fossgalaxy.games.tbs.editor.Editor;
import com.fossgalaxy.games.tbs.io.SettingsIO;
public class TransmissionEditor {
public static void main(String[] args) {
Editor.run(SettingsIO.buildWithExtras("com.fossgalaxy.games.ggj2017"), "transmission.json", "transmissionMap.json");
}
}
......@@ -3,9 +3,9 @@ package com.fossgalaxy.games.ggj2017.drones;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.actions.BuildAction;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.EntityType;
import com.fossgalaxy.games.tbs.order.BuildOrder;
import com.fossgalaxy.games.tbs.order.Order;
import com.fossgalaxy.games.tbs.parameters.EntityType;
import com.fossgalaxy.object.annotations.ObjectDef;
import org.codetome.hexameter.core.api.CubeCoordinate;
......
......@@ -3,10 +3,10 @@ package com.fossgalaxy.games.ggj2017.drones;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.actions.BuildOnResourceAction;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.EntityType;
import com.fossgalaxy.games.tbs.entity.ResourceType;
import com.fossgalaxy.games.tbs.order.BuildOrder;
import com.fossgalaxy.games.tbs.order.Order;
import com.fossgalaxy.games.tbs.parameters.EntityType;
import com.fossgalaxy.games.tbs.parameters.ResourceType;
import com.fossgalaxy.object.annotations.ObjectDef;
import org.codetome.hexameter.core.api.CubeCoordinate;
......
......@@ -3,7 +3,7 @@ package com.fossgalaxy.games.ggj2017.drones;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.actions.MinesAction;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.ResourceType;
import com.fossgalaxy.games.tbs.parameters.ResourceType;
import com.fossgalaxy.object.annotations.ObjectDef;
import org.codetome.hexameter.core.api.CubeCoordinate;
......
......@@ -3,7 +3,7 @@ package com.fossgalaxy.games.ggj2017.drones;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.actions.UpgradeAction;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.EntityType;
import com.fossgalaxy.games.tbs.parameters.EntityType;
import com.fossgalaxy.object.annotations.ObjectDef;
import org.codetome.hexameter.core.api.CubeCoordinate;
......
......@@ -4,8 +4,8 @@ package com.fossgalaxy.games.ggj2017.orders;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.Resource;
import com.fossgalaxy.games.tbs.entity.ResourceType;
import com.fossgalaxy.games.tbs.order.Order;
import com.fossgalaxy.games.tbs.parameters.ResourceType;
public class MineOrder implements Order {
......
......@@ -3,8 +3,8 @@ package com.fossgalaxy.games.ggj2017.orders;
import com.fossgalaxy.games.tbs.GameState;
import com.fossgalaxy.games.tbs.entity.Entity;
import com.fossgalaxy.games.tbs.entity.EntityType;
import com.fossgalaxy.games.tbs.order.Order;
import com.fossgalaxy.games.tbs.parameters.EntityType;
public class UpgradeOrder implements Order {
private EntityType from;
......
src/main/resources/img/black.png

4.61 KiB

{
}
\ No newline at end of file
{
"SqrtEvalCustom":"SqrtEval3[0:100]"
}
\ No newline at end of file
{
}
\ No newline at end of file
[
{"id":"space", "requiredTags": {"space": 1}, "image": "black" },
{"id": "asteroid4", "requiredTags":{}, "image": "rocks/meteorBrown_big_4"},
{"id": "asteroid3", "requiredTags":{}, "image": "rocks/meteorBrown_big_3"},
{"id": "asteroid2", "requiredTags":{}, "image": "rocks/meteorBrown_big_2"},
{"id": "asteroid1", "requiredTags":{}, "image": "rocks/meteorBrown_big_1"}
]
\ No newline at end of file
{
"hexSize":32,
"turnLimit": 100,
"resourcesFileName":"transmission.resources.json",
"typeFiles":["transmission.types.json"],
"resourcesFileName":"transmission-resources.json",
"terrainFileName":"transmission-terrain.json",
"typeFiles":["transmission-types.json"],
"evalFileName":"transmission-eval.json",
"aiFileName":"transmission-ai.json",
"ruleFileName":"transmission-rules.json",
"rules":[
"LastManStanding"
......
{
"width": 15,
"height": 15,
"players": 2,
"hexSize": 32,
"resources": [
{
"name": "gold",
"amount": 1,
"location": {
"x": -1,
"z": 2
}
},
{
"name": "metal",
"amount": 1,
"location": {
"x": 0,
"z": 2
}
},
{
"name": "energy",
"amount": 1,
"location": {
"x": 1,
"z": 2
}
}
],
"entities": [
{
"type": "red_base",
"location": {
"x": -3,
"z": 13
},
"owner": 0,
"properties": {
"health": 15
}
},
{
"type": "blue_base",
"location": {
"x": 3,
"z": 1
},
"owner": 1,
"properties": {
"health": 15
}
}
],
"terrain": {
"space": [
{
"x": 0,
"z": 0
},
{
"x": 1,
"z": 0
},
{
"x": 2,
"z": 0
},
{
"x": 3,
"z": 0
},
{
"x": 4,
"z": 0
},
{
"x": 5,
"z": 0
},
{
"x": 6,
"z": 0
},
{
"x": 7,
"z": 0
},
{
"x": 8,
"z": 0
},
{
"x": 9,
"z": 0
},
{
"x": 10,
"z": 0
},
{
"x": 11,
"z": 0
},
{
"x": 12,
"z": 0
},
{
"x": 13,
"z": 0
},
{
"x": 14,
"z": 0
},
{
"x": 0,
"z": 1
},
{
"x": 1,
"z": 1
},
{
"x": 2,
"z": 1
},
{
"x": 3,
"z": 1
},
{
"x": 4,
"z": 1
},
{
"x": 5,
"z": 1
},
{
"x": 6,
"z": 1
},
{
"x": 7,
"z": 1
},
{
"x": 8,
"z": 1
},
{
"x": 9,
"z": 1
},
{
"x": 10,
"z": 1
},
{
"x": 11,
"z": 1
},
{
"x": 12,
"z": 1
},
{
"x": 13,
"z": 1
},
{
"x": 14,
"z": 1
},
{
"x": -1,
"z": 2
},
{
"x": 0,
"z": 2
},
{
"x": 1,
"z": 2
},
{
"x": 2,
"z": 2
},
{
"x": 3,
"z": 2
},
{
"x": 4,
"z": 2
},
{
"x": 5,
"z": 2
},
{
"x": 6,
"z": 2
},
{
"x": 7,
"z": 2
},
{
"x": 8,
"z": 2
},
{
"x": 9,
"z": 2
},
{
"x": 10,
"z": 2
},
{
"x": 11,
"z": 2
},
{
"x": 12,
"z": 2
},
{
"x": 13,
"z": 2
},
{
"x": -1,
"z": 3
},
{
"x": 0,
"z": 3
},
{
"x": 1,
"z": 3
},
{
"x": 2,
"z": 3
},
{
"x": 3,
"z": 3
},
{
"x": 4,
"z": 3
},
{
"x": 5,
"z": 3
},
{
"x": 6,
"z": 3
},
{
"x": 7,
"z": 3
},
{
"x": 8,
"z": 3
},
{
"x": 9,
"z": 3
},
{
"x": 10,
"z": 3
},
{
"x": 11,
"z": 3
},
{
"x": 12,
"z": 3
},
{
"x": 13,
"z": 3
},
{
"x": -2,
"z": 4
},
{
"x": -1,
"z": 4
},
{
"x": 0,
"z": 4
},
{
"x": 1,
"z": 4
},
{
"x": 2,
"z": 4
},
{
"x": 3,
"z": 4
},
{
"x": 4,
"z": 4
},
{
"x": 5,
"z": 4
},
{
"x": 6,
"z": 4
},
{
"x": 7,
"z": 4
},
{
"x": 8,
"z": 4
},
{
"x": 9,
"z": 4
},
{
"x": 10,
"z": 4
},
{
"x": 11,
"z": 4
},
{
"x": 12,
"z": 4
},
{
"x": -2,
"z": 5
},
{
"x": -1,
"z": 5
},
{
"x": 0,
"z": 5
},
{
"x": 1,
"z": 5
},
{
"x": 2,
"z": 5
},
{
"x": 3,
"z": 5
},
{
"x": 4,
"z": 5
},
{
"x": 5,
"z": 5
},
{
"x": 6,
"z": 5
},
{
"x": 7,
"z": 5
},
{
"x": 8,
"z": 5
},
{
"x": 9,
"z": 5
},
{
"x": 10,
"z": 5
},
{
"x": 11,
"z": 5
},
{
"x": 12,
"z": 5
},
{
"x": -3,
"z": 6
},
{
"x": -2,
"z": 6
},
{
"x": -1,
"z": 6
},
{
"x": 0,
"z": 6
},
{
"x": 1,
"z": 6
},
{
"x": 2,
"z": 6
},
{
"x": 3,
"z": 6
},
{
"x": 4,
"z": 6
},
{
"x": 5,
"z": 6
},
{
"x": 6,
"z": 6
},
{
"x": 7,
"z": 6
},
{
"x": 8,
"z": 6
},
{
"x": 9,
"z": 6
},
{
"x": 10,
"z": 6
},
{
"x": 11,
"z": 6
},
{
"x": -3,
"z": 7
},
{
"x": -2,
"z": 7
},
{
"x": -1,
"z": 7
},
{
"x": 0,
"z": 7
},
{
"x": 1,
"z": 7
},
{
"x": 2,
"z": 7
},
{
"x": 3,
"z": 7
},
{
"x": 4,
"z": 7
},
{
"x": 5,
"z": 7
},
{
"x": 6,
"z": 7
},
{
"x": 7,
"z": 7
},
{
"x": 8,
"z": 7
},
{
"x": 9,
"z": 7
},
{
"x": 10,
"z": 7
},
{
"x": 11,
"z": 7
},
{
"x": -4,
"z": 8
},
{
"x": -3,
"z": 8
},
{
"x": -2,
"z": 8
},
{
"x": -1,
"z": 8
},
{
"x": 0,
"z": 8
},
{
"x": 1,
"z": 8
},
{
"x": 2,
"z": 8
},
{
"x": 3,
"z": 8
},
{
"x": 4,
"z": 8
},
{
"x": 5,
"z": 8
},
{
"x": 6,
"z": 8
},
{
"x": 7,
"z": 8
},
{
"x": 8,
"z": 8
},
{
"x": 9,
"z": 8
},
{
"x": 10,
"z": 8
},
{
"x": -4,
"z": 9
},
{
"x": -3,
"z": 9
},
{
"x": -2,
"z": 9
},
{
"x": -1,
"z": 9
},
{
"x": 0,
"z": 9
},
{
"x": 1,
"z": 9
},
{
"x": 2,
"z": 9
},
{
"x": 3,
"z": 9
},
{
"x": 4,
"z": 9
},
{
"x": 5,
"z": 9
},
{
"x": 6,
"z": 9
},
{
"x": 7,
"z": 9
},
{
"x": 8,
"z": 9
},
{
"x": 9,
"z": 9
},
{
"x": 10,
"z": 9
},
{
"x": -5,
"z": 10
},
{
"x": -4,
"z": 10
},
{
"x": -3,
"z": 10
},
{
"x": -2,
"z": 10
},
{
"x": -1,
"z": 10
},
{
"x": 0,
"z": 10
},
{
"x": 1,
"z": 10
},
{
"x": 2,
"z": 10
},
{
"x": 3,
"z": 10
},
{
"x": 4,
"z": 10
},
{
"x": 5,
"z": 10
},
{
"x": 6,
"z": 10
},
{
"x": 7,
"z": 10
},
{
"x": 8,
"z": 10
},
{
"x": 9,
"z": 10
},
{
"x": -5,
"z": 11
},
{
"x": -4,
"z": 11
},
{
"x": -3,
"z": 11
},
{
"x": -2,
"z": 11
},
{
"x": -1,
"z": 11
},
{
"x": 0,
"z": 11
},
{
"x": 1,
"z": 11
},
{
"x": 2,
"z": 11
},
{
"x": 3,
"z": 11
},
{
"x": 4,
"z": 11
},
{
"x": 5,
"z": 11
},
{
"x": 6,
"z": 11
},
{
"x": 7,
"z": 11
},
{
"x": 8,
"z": 11
},
{
"x": 9,
"z": 11
},
{
"x": -6,
"z": 12
},
{
"x": -5,
"z": 12
},
{
"x": -4,
"z": 12
},
{
"x": -3,
"z": 12
},
{
"x": -2,
"z": 12
},
{
"x": -1,
"z": 12
},
{
"x": 0,
"z": 12
},
{
"x": 1,
"z": 12
},
{
"x": 2,
"z": 12
},
{
"x": 3,
"z": 12
},
{
"x": 4,
"z": 12
},
{
"x": 5,
"z": 12
},
{
"x": 6,
"z": 12
},
{
"x": 7,
"z": 12
},
{
"x": 8,
"z": 12
},
{
"x": -6,
"z": 13
},
{
"x": -5,
"z": 13
},
{
"x": -4,
"z": 13
},
{
"x": -3,
"z": 13
},
{
"x": -2,
"z": 13
},
{
"x": -1,
"z": 13
},
{
"x": 0,
"z": 13
},
{
"x": 1,
"z": 13
},
{
"x": 2,
"z": 13
},
{
"x": 3,
"z": 13
},
{
"x": 4,
"z": 13
},
{
"x": 5,
"z": 13
},
{
"x": 6,
"z": 13
},
{
"x": 7,
"z": 13
},
{
"x": 8,
"z": 13
},
{
"x": -7,
"z": 14
},
{
"x": -6,
"z": 14
},
{
"x": -5,
"z": 14
},
{
"x": -4,
"z": 14
},
{
"x": -3,
"z": 14
},
{
"x": -2,
"z": 14
},
{
"x": -1,
"z": 14
},
{
"x": 0,
"z": 14
},
{
"x": 1,
"z": 14
},
{
"x": 2,
"z": 14
},
{
"x": 3,
"z": 14
},
{
"x": 4,
"z": 14
},
{
"x": 5,
"z": 14
},
{
"x": 6,
"z": 14
},
{
"x": 7,
"z": 14
}
]
},
"startingResources": {}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment