Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Build & test project

on:
push:
branches: [ master ]
branches: [ master, development ]
paths:
- src/**
- build.gradle
- settings.gradle
pull_request:
branches: [ master ]
branches: [ master, development ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Binary file added assets/chest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/diamond.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/knight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/map10x10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/zombie.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"tag": "location-1",
"objects": [
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "interactive" }
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible", "assetPath": "assets/someDude.png" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "dialog", "assetPath": "assets/someDude.png" }
],
"backgroundPath": "file:assets/map.png"
"backgroundPath": "assets/map.png"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"tag": "object-1",
"assetPath": "/path/to/the/asset",
"type": ""
}
"assetPath": "assets/someDude.png",
"type": "collectible",
"position": {
"row": 10,
"col": 10
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tag": "object-2",
"assetPath": "assets/stone.png",
"type": "navigable",
"position": { "row": 11, "col": 3 }
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"tag": "location-2",
"objects": [
{ "tag": "object-1", "position": { "row": 0, "col": 0 }, "type": "collectible" },
{ "tag": "object-3", "position": { "row": 0, "col": 1 }, "type": "navigable" }
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible", "assetPath": "assets/someDude.png" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "dialog", "assetPath": "assets/someDude.png" }
],
"backgroundPath": "file:assets/map.png"
}
"backgroundPath": "assets/map.png"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"tag": "object-1",
"assetPath": "/path/to/the/asset",
"type": ""
}
"assetPath": "assets/stone.png",
"type": "dialog",
"position": {
"row": 1,
"col": 15
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"tag": "object-3",
"assetPath": "/path/to/the/asset",
"type": ""
}
"assetPath": "assets/someDudeButGreen.png",
"type": "collectible",
"position": {
"row": 7,
"col": 8
}
}
11 changes: 9 additions & 2 deletions configurations/config-1/root.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,12 @@
"location-1",
"location-2"
],
"rootLocation": "location-1"
}
"rootLocation": "location-1",
"player": {
"tag": "player",
"position": { "row": 4, "col": 5 },
"type": "player",
"assetPath": "assets/stone.png",
"location": "location-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"tag": "location-1",
"objects": [
{ "tag": "object-1", "position": { "row": 1, "col": 8 }, "type": "collectible", "assetPath": "assets/diamond.png" },
{ "tag": "object-2", "position": { "row": 6, "col": 3 }, "type": "collectible", "assetPath": "assets/key.png" },
{ "tag": "object-3", "position": { "row": 1, "col": 1 }, "type": "dialog", "assetPath": "assets/zombie.png" },
{ "tag": "object-4", "position": { "row": 3, "col": 2 }, "type": "dialog", "assetPath": "assets/zombie.png" },
{ "tag": "object-5", "position": { "row": 8, "col": 8 }, "type": "dialog", "assetPath": "assets/chest.png" }
],
"backgroundPath": "assets/map.png"
}
14 changes: 14 additions & 0 deletions configurations/demo-config-1/root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tag": "GameByConfig1",
"locationTags": [
"location-1"
],
"rootLocation": "location-1",
"player": {
"tag": "player",
"position": { "row": 4, "col": 5 },
"type": "player",
"assetPath": "assets/knight.png",
"location": "location-1"
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions configurations/unit-test-configuration/root.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"tag": "location-1",
"objects": [
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "interactive" }
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible", "assetPath": "assets/someDude.png" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "dialog", "assetPath": "assets/someDude.png" }
],
"backgroundPath": "file:assets/map.png"
"backgroundPath": "assets/map.png"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tag": "object-1",
"assetPath": "assets/someDude.png",
"type": "collectible",
"position": {
"row": 10,
"col": 10
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tag": "object-2",
"assetPath": "assets/stone.png",
"type": "navigable",
"position": { "row": 11, "col": 3 }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"tag": "location-2",
"objects": [
{ "tag": "object-1", "position": { "row": 0, "col": 5 }, "type": "collectible", "assetPath": "assets/someDude.png" },
{ "tag": "object-2", "position": { "row": 1, "col": 3 }, "type": "dialog", "assetPath": "assets/someDude.png" }
],
"backgroundPath": "assets/map.png"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tag": "object-1",
"assetPath": "assets/stone.png",
"type": "dialog",
"position": {
"row": 1,
"col": 15
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"tag": "object-3",
"assetPath": "assets/someDudeButGreen.png",
"type": "collectible",
"position": {
"row": 7,
"col": 8
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"tag": "test-config-1-full",
"locationTags": [
"location-1",
"location-2"
],
"rootLocation": "location-1",
"player": {
"tag": "player",
"position": { "row": 4, "col": 5 },
"type": "player",
"assetPath": "assets/stone.png",
"location": "location-1"
}
}
4 changes: 4 additions & 0 deletions src/main/java/io/rpg/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ public Builder setController(Controller controller) {
return this;
}
}

public Controller getController() {
return controller;
}
}
Loading