Skip to content
Snippets Groups Projects
Commit 3f01283c authored by Schuh Martin's avatar Schuh Martin
Browse files

Update: coreMaps.json (added new maps)

Update: GameSceneController.java (selected map will now be loaded for game)
Update: Persistence.java (added call of "resetGameStats()" method from RuntimeInfo.java at end of updateStats method)
Update: RuntimeInfo.java (added method to reset game-stats)

Issue: #89
parent c5687ac3
No related branches found
No related tags found
5 merge requests!74V1,!73Initial commit,!71Merge DataBase into Development,!27Player can now place bombs that have a explosion radius that dont go through the wall.,!25Update: coreMaps.json (added new maps)
...@@ -113,7 +113,7 @@ public class GameSceneController implements Initializable { ...@@ -113,7 +113,7 @@ public class GameSceneController implements Initializable {
} }
tileManager = new TileManager(graphicsContext2D, diffTileCount, horizontalTileCount, tileManager = new TileManager(graphicsContext2D, diffTileCount, horizontalTileCount,
verticalTileCount, mapString, biom); verticalTileCount, runtimeInfo.getMapDataGame(), biom);
runtimeInfo.setGameState(GameState.PLAYING); runtimeInfo.setGameState(GameState.PLAYING);
......
...@@ -251,6 +251,7 @@ public class Persistence { ...@@ -251,6 +251,7 @@ public class Persistence {
else{ else{
statistics.addGamesLost(); statistics.addGamesLost();
} }
RuntimeInfo.getInstance().resetGameStats();
log.info("Statistics successfully updated!"); log.info("Statistics successfully updated!");
} }
catch(Exception e){ catch(Exception e){
......
...@@ -34,17 +34,16 @@ public class RuntimeInfo { ...@@ -34,17 +34,16 @@ public class RuntimeInfo {
private List<IEntity> gameplayObjects = new ArrayList<>(); private List<IEntity> gameplayObjects = new ArrayList<>();
//Stats Tracking during Gameplay //Stats Tracking during Gameplay
private int kills; private int kills = 0;
private int deaths; private int deaths = 0;
private int blocksDestroyed; private int blocksDestroyed = 0;
private int gameTime; private int gameTime = 0;
private boolean gameWon; private boolean gameWon = true;
private RuntimeInfo() {
}
; private RuntimeInfo() {}
public static RuntimeInfo getInstance() { public static RuntimeInfo getInstance() {
return runtimeInfoSingleton; return runtimeInfoSingleton;
...@@ -70,6 +69,14 @@ public class RuntimeInfo { ...@@ -70,6 +69,14 @@ public class RuntimeInfo {
} }
} }
public void resetGameStats(){
kills = 0;
deaths = 0;
blocksDestroyed = 0;
gameTime = 0;
gameWon = true;
}
public GameState getGameState() { public GameState getGameState() {
return gameState; return gameState;
} }
......
[ [
{ {
"mapID": "b8f5da1a3619a3585978a6d9c8c683c3210193e6", "mapID": "b8f5da1a3619a3585978a6d9c8c683c3210193e6",
"mapName": "Arena1", "mapName": "Ruins",
"mapWidth": 18, "mapWidth": 18,
"mapHeight": 18, "mapHeight": 18,
"mapData": "11 10 13 10 13 10 10 12 14 14 11 10 10 13 10 13 10 12 11 0 0 0 0 0 16 0 2 2 0 3 0 0 0 3 0 12 11 0 16 0 0 0 0 0 1 2 0 0 0 0 16 0 1 12 11 16 0 0 3 0 16 0 2 2 0 0 3 0 0 0 0 12 11 0 3 0 0 16 0 1 1 2 0 0 0 0 16 0 0 12 11 0 0 16 16 0 0 0 1 2 0 0 0 0 3 16 0 12 11 16 0 0 12 10 10 15 12 2 11 15 16 15 15 11 0 12 11 0 0 0 12 0 1 1 0 2 0 0 0 0 0 11 0 12 11 0 0 16 12 5 5 5 5 4 5 5 5 5 0 11 1 12 11 0 0 0 12 11 10 10 10 2 12 0 0 1 0 11 0 12 11 0 0 0 12 1 0 0 11 2 12 16 0 1 0 11 0 12 11 0 0 0 12 0 1 0 11 2 12 0 16 0 0 11 0 12 11 0 1 0 12 0 0 12 11 2 12 11 13 10 13 11 0 12 11 0 0 0 12 0 0 0 0 2 0 0 0 0 0 0 0 12 11 0 0 0 12 15 13 10 12 14 11 10 13 10 13 12 0 12 11 1 0 0 1 0 0 0 0 2 0 0 1 1 0 0 0 12 11 0 0 1 0 0 1 0 0 2 0 0 1 0 0 1 0 12 11 10 15 15 10 10 15 10 12 14 11 10 10 15 10 15 10 12" "mapData": "11 10 13 10 13 10 10 12 14 14 11 10 10 13 10 13 10 12 11 0 0 0 0 0 16 0 2 2 0 3 0 0 0 3 0 12 11 0 16 0 0 0 0 0 1 2 0 0 0 0 16 0 1 12 11 16 0 0 3 0 16 0 2 2 0 0 3 0 0 0 0 12 11 0 3 0 0 16 0 1 1 2 0 0 0 0 16 0 0 12 11 0 0 16 16 0 0 0 1 2 0 0 0 0 3 16 0 12 11 16 0 0 12 10 10 15 12 2 11 15 16 15 15 11 0 12 11 0 0 0 12 0 1 1 0 2 0 0 0 0 0 11 0 12 11 0 0 16 12 5 5 5 5 4 5 5 5 5 0 11 1 12 11 0 0 0 12 11 10 10 10 2 12 0 0 1 0 11 0 12 11 0 0 0 12 1 0 0 11 2 12 16 0 1 0 11 0 12 11 0 0 0 12 0 1 0 11 2 12 0 16 0 0 11 0 12 11 0 1 0 12 0 0 12 11 2 12 11 13 10 13 11 0 12 11 0 0 0 12 0 0 0 0 2 0 0 0 0 0 0 0 12 11 0 0 0 12 15 13 10 12 14 11 10 13 10 13 12 0 12 11 1 0 0 1 0 0 0 0 2 0 0 1 1 0 0 0 12 11 0 0 1 0 0 1 0 0 2 0 0 1 0 0 1 0 12 11 10 15 15 10 10 15 10 12 14 11 10 10 15 10 15 10 12"
...@@ -12,5 +12,26 @@ ...@@ -12,5 +12,26 @@
"mapWidth": 18, "mapWidth": 18,
"mapHeight": 18, "mapHeight": 18,
"mapData": "16 16 16 16 16 16 16 16 16 16 10 12 13 11 12 14 11 12 16 0 16 0 0 1 0 0 0 0 1 0 0 1 0 2 0 12 16 0 0 0 0 0 16 16 0 0 15 3 0 0 0 2 1 12 16 0 0 2 16 0 0 1 16 0 15 15 3 3 0 2 0 12 11 10 12 2 11 10 12 0 16 0 0 15 15 3 1 2 0 12 11 0 0 2 0 0 12 0 0 16 0 0 15 3 0 2 0 12 11 0 10 2 10 0 12 0 0 16 0 0 15 15 12 2 11 12 11 0 10 2 10 0 12 0 0 0 0 0 0 0 0 2 0 16 11 0 1 2 10 0 12 16 0 0 11 10 0 10 12 2 0 16 11 0 10 2 10 0 1 0 0 16 11 3 0 0 12 0 1 16 11 0 10 2 10 0 12 0 16 0 11 0 0 1 12 2 0 16 11 0 10 2 10 0 12 0 0 0 11 0 0 0 12 2 0 16 11 0 0 1 0 0 12 16 0 0 11 0 0 0 12 0 0 16 11 10 12 2 11 10 12 0 16 0 11 0 10 10 12 2 0 16 16 0 0 2 16 0 0 0 0 0 11 0 0 3 12 0 11 12 16 0 16 16 16 0 0 16 0 0 1 0 0 0 0 2 0 12 16 0 0 0 0 0 0 0 0 0 11 0 0 1 0 2 0 12 16 16 16 16 16 16 16 16 16 16 11 12 13 11 12 14 11 12" "mapData": "16 16 16 16 16 16 16 16 16 16 10 12 13 11 12 14 11 12 16 0 16 0 0 1 0 0 0 0 1 0 0 1 0 2 0 12 16 0 0 0 0 0 16 16 0 0 15 3 0 0 0 2 1 12 16 0 0 2 16 0 0 1 16 0 15 15 3 3 0 2 0 12 11 10 12 2 11 10 12 0 16 0 0 15 15 3 1 2 0 12 11 0 0 2 0 0 12 0 0 16 0 0 15 3 0 2 0 12 11 0 10 2 10 0 12 0 0 16 0 0 15 15 12 2 11 12 11 0 10 2 10 0 12 0 0 0 0 0 0 0 0 2 0 16 11 0 1 2 10 0 12 16 0 0 11 10 0 10 12 2 0 16 11 0 10 2 10 0 1 0 0 16 11 3 0 0 12 0 1 16 11 0 10 2 10 0 12 0 16 0 11 0 0 1 12 2 0 16 11 0 10 2 10 0 12 0 0 0 11 0 0 0 12 2 0 16 11 0 0 1 0 0 12 16 0 0 11 0 0 0 12 0 0 16 11 10 12 2 11 10 12 0 16 0 11 0 10 10 12 2 0 16 16 0 0 2 16 0 0 0 0 0 11 0 0 3 12 0 11 12 16 0 16 16 16 0 0 16 0 0 1 0 0 0 0 2 0 12 16 0 0 0 0 0 0 0 0 0 11 0 0 1 0 2 0 12 16 16 16 16 16 16 16 16 16 16 11 12 13 11 12 14 11 12"
},
{
"mapID": "ac7c6f0fcaaf730804925aae280cce26f0da481e",
"mapName": "AsymmetricBomberman",
"mapWidth": 18,
"mapHeight": 18,
"mapData": "10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1 1 1 20 1 20 1 20 1 20 1 20 1 20 1 1 10 10 1 1 20 10 20 10 20 10 20 10 20 10 20 10 20 1 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 1 20 1 20 1 20 1 1 10 10 1 1 20 10 20 10 20 10 20 10 20 10 20 10 1 1 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10"
},
{
"mapID": "ff52df212fcd29f16db9d7aa11d305cad9063c35",
"mapName": "SymmetricBomberman",
"mapWidth": 18,
"mapHeight": 18,
"mapData": "10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1 1 20 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 1 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 20 20 1 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 1 20 1 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 1 20 1 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 1 20 1 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 1 20 1 20 1 20 1 20 20 1 20 1 20 1 20 1 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 1 20 1 20 1 20 1 20 20 1 20 1 20 1 20 20 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 1 10 10 1 20 1 20 1 20 1 20 1 20 20 1 20 20 1 1 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10"
},
{
"mapID": "8bf04771fc5eea669f8dda582fe8d8b159f15009",
"mapName": "SymmetricBombermanFullBoxed",
"mapWidth": 18,
"mapHeight": 18,
"mapData": "10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1 1 20 20 20 20 20 20 20 20 20 20 20 20 1 1 10 10 1 10 20 10 20 10 20 10 10 20 10 20 10 20 10 1 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 20 10 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 20 10 20 10 20 10 20 10 10 20 10 20 10 20 10 20 10 10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 10 10 1 10 20 10 20 10 20 10 10 20 10 20 10 20 10 1 10 10 1 1 20 20 20 20 20 20 20 20 20 20 20 20 1 1 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10"
} }
] ]
\ No newline at end of file
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