Commit 6a891e66 authored by Theodore Lopez's avatar Theodore Lopez
parents 0174f3e8 2e4aff74
...@@ -2,16 +2,13 @@ package core.abilities.effects; ...@@ -2,16 +2,13 @@ package core.abilities.effects;
import core.event.AbilityEvent; import core.event.AbilityEvent;
import core.event.Event; import core.event.Event;
import core.event.MoveEvent;
import core.gamestate.*; import core.gamestate.*;
import core.gamestate.Character; import core.gamestate.Character;
import core.relayer.Relayer;
import core.relayer.RelayerEntity; import core.relayer.RelayerEntity;
import core.relayer.Relayers; import core.relayer.Relayers;
import core.zone.Direction; import core.zone.Direction;
import core.zone.Translation;
import core.zone.Zone; import core.zone.Zone;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -103,8 +100,8 @@ public class EffectBuilder implements Serializable{ ...@@ -103,8 +100,8 @@ public class EffectBuilder implements Serializable{
gameContent.getGameState().addEntity(entity); gameContent.getGameState().addEntity(entity);
gameContent.addTriggerToCheck(entity); gameContent.addTriggerToCheck(entity);
RelayerEntity relayer = Relayers.addNewRelayer(entity); RelayerEntity relayer = Relayers.addNewRelayer(entity);
if(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) { if(LocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) {
relayer.move(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection()); relayer.move(LocalGameLoop.getInstance().getFollowedRelayer().getDirection());
} }
else{ else{
relayer.move(charac.getDirection()); relayer.move(charac.getDirection());
...@@ -138,8 +135,9 @@ public class EffectBuilder implements Serializable{ ...@@ -138,8 +135,9 @@ public class EffectBuilder implements Serializable{
gameContent.getGameState().addEntity(entity); gameContent.getGameState().addEntity(entity);
gameContent.addTriggerToCheck(entity); gameContent.addTriggerToCheck(entity);
RelayerEntity relayer = Relayers.addNewRelayer(entity); RelayerEntity relayer = Relayers.addNewRelayer(entity);
if(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) {
relayer.move(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection()); if(LocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) {
relayer.move(LocalGameLoop.getInstance().getFollowedRelayer().getDirection());
} }
else{ else{
relayer.move(charac.getDirection()); relayer.move(charac.getDirection());
...@@ -173,8 +171,8 @@ public class EffectBuilder implements Serializable{ ...@@ -173,8 +171,8 @@ public class EffectBuilder implements Serializable{
gameContent.getGameState().addEntity(entity); gameContent.getGameState().addEntity(entity);
gameContent.addTriggerToCheck(entity); gameContent.addTriggerToCheck(entity);
RelayerEntity relayer = Relayers.addNewRelayer(entity); RelayerEntity relayer = Relayers.addNewRelayer(entity);
if(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) { if(LocalGameLoop.getInstance().getFollowedRelayer().getDirection() != Direction.NONE) {
relayer.move(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection()); relayer.move(LocalGameLoop.getInstance().getFollowedRelayer().getDirection());
} }
else{ else{
relayer.move(charac.getDirection()); relayer.move(charac.getDirection());
...@@ -227,7 +225,7 @@ public class EffectBuilder implements Serializable{ ...@@ -227,7 +225,7 @@ public class EffectBuilder implements Serializable{
} }
if(hit){ if(hit){
Event event = new AbilityEvent(casterCharacterID, 0); Event event = new AbilityEvent(casterCharacterID, 0);
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
} }
}; };
...@@ -275,7 +273,7 @@ public class EffectBuilder implements Serializable{ ...@@ -275,7 +273,7 @@ public class EffectBuilder implements Serializable{
} }
if(hit){ if(hit){
Event event = new AbilityEvent(casterCharacterID, 0); Event event = new AbilityEvent(casterCharacterID, 0);
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
} }
}; };
......
...@@ -4,7 +4,7 @@ import java.io.Serializable; ...@@ -4,7 +4,7 @@ import java.io.Serializable;
import core.gamestate.Entity; import core.gamestate.Entity;
import core.gamestate.GameContent; import core.gamestate.GameContent;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
/** /**
* Created by dupriez on 22/11/15. * Created by dupriez on 22/11/15.
...@@ -32,7 +32,7 @@ public class MapInit implements ClientEvent, Serializable { ...@@ -32,7 +32,7 @@ public class MapInit implements ClientEvent, Serializable {
@Override @Override
public boolean execute(GameContent gameContent) { public boolean execute(GameContent gameContent) {
DummyLocalGameLoop.getInstance().setContent(this.gameContent); LocalGameLoop.getInstance().setContent(this.gameContent);
return true; return true;
} }
......
...@@ -7,7 +7,7 @@ import core.gamestate.EntityNotFoundExeption; ...@@ -7,7 +7,7 @@ import core.gamestate.EntityNotFoundExeption;
import core.gamestate.GameContent; import core.gamestate.GameContent;
import core.zone.Point; import core.zone.Point;
import core.zone.Translation; import core.zone.Translation;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
/** /**
* This event is executed when an entity wants to move. * This event is executed when an entity wants to move.
...@@ -37,7 +37,7 @@ public class MoveEvent implements ClientEvent,ServerEvent { ...@@ -37,7 +37,7 @@ public class MoveEvent implements ClientEvent,ServerEvent {
} }
else if(target.getSpeciesName().equals("FrostBolt") || target.getSpeciesName().equals("FireBoltLP")){ else if(target.getSpeciesName().equals("FrostBolt") || target.getSpeciesName().equals("FireBoltLP")){
Event event = new AbilityEvent(targetID, 0); Event event = new AbilityEvent(targetID, 0);
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
return true; return true;
} catch (EntityNotFoundExeption entityNotFoundExeption) { } catch (EntityNotFoundExeption entityNotFoundExeption) {
......
...@@ -6,16 +6,14 @@ import java.util.Objects; ...@@ -6,16 +6,14 @@ import java.util.Objects;
import java.util.logging.Logger; import java.util.logging.Logger;
import core.abilities.Ability; import core.abilities.Ability;
import core.abilities.effects.EffectBuilder;
import core.event.Event; import core.event.Event;
import core.event.SpawnGold; import core.event.SpawnGold;
import core.event.ToServerDeathEvent; import core.event.ToServerDeathEvent;
import core.zone.Zone; import core.zone.Zone;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import graphics.guiSkeleton.entityDisplayer.EntityDisplayerType; import graphics.guiSkeleton.entityDisplayer.EntityDisplayerType;
import logging.Logging; import logging.Logging;
import map_generation.tiles.TilePropertyVector; import map_generation.tiles.TilePropertyVector;
import network.inner_shell.NetworkConnection;
/** /**
* This class represents an Entity able to be hit and die. * This class represents an Entity able to be hit and die.
...@@ -149,20 +147,19 @@ public class Being extends Entity { ...@@ -149,20 +147,19 @@ public class Being extends Entity {
if (HP==0){ if (HP==0){
Event event = new ToServerDeathEvent(this.getID()); Event event = new ToServerDeathEvent(this.getID());
Logger LOGGER = Logging.getInstance().getLogger(); Logger LOGGER = Logging.getInstance().getLogger();
NetworkConnection network = DummyLocalGameLoop.getInstance().getNetworkConnection(); if (LocalGameLoop.getInstance().networkConnectionIsNull()){
if (network==null){
LOGGER.severe("NetworkConnection null, Being"+this.getID()+" can't die"); LOGGER.severe("NetworkConnection null, Being"+this.getID()+" can't die");
} else { } else {
LOGGER.info("Death of "+this.getID()+" is send"); LOGGER.info("Death of "+this.getID()+" is send");
network.sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
Event event2 = new SpawnGold(this.getID()); Event event2 = new SpawnGold(this.getID());
if (network==null){ if (LocalGameLoop.getInstance().networkConnectionIsNull()){
LOGGER.severe("NetworkConnection null, GOld"+this.getID()+" can't be created"); LOGGER.severe("NetworkConnection null, GOld"+this.getID()+" can't be created");
} else { } else {
LOGGER.info("Gold creation by " + this.getID() + " is send"); LOGGER.info("Gold creation by " + this.getID() + " is send");
network.sendEvent(event2); LocalGameLoop.getInstance().sendEvent(event2);
} }
} }
......
...@@ -7,7 +7,7 @@ import core.gamestate.Action; ...@@ -7,7 +7,7 @@ import core.gamestate.Action;
import core.gamestate.Character; import core.gamestate.Character;
import core.zone.Direction; import core.zone.Direction;
import core.zone.Translation; import core.zone.Translation;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import gameloop.ServerLoop; import gameloop.ServerLoop;
import java.util.Objects; import java.util.Objects;
...@@ -68,7 +68,7 @@ public class Relayer extends RelayerEntity{ ...@@ -68,7 +68,7 @@ public class Relayer extends RelayerEntity{
return; return;
} }
Event event = new MoveEvent(character.getID(), Translation.construct(direction,character.getSpeed())); Event event = new MoveEvent(character.getID(), Translation.construct(direction,character.getSpeed()));
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
private void stopMove(){ private void stopMove(){
...@@ -89,7 +89,7 @@ public class Relayer extends RelayerEntity{ ...@@ -89,7 +89,7 @@ public class Relayer extends RelayerEntity{
*/ */
private void applyAbility() { private void applyAbility() {
Event event = new AbilityEvent(character.getID(), currentAbility); Event event = new AbilityEvent(character.getID(), currentAbility);
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
hasTriedToCastAbility = false; hasTriedToCastAbility = false;
} }
......
...@@ -7,7 +7,7 @@ import core.gamestate.Entity; ...@@ -7,7 +7,7 @@ import core.gamestate.Entity;
import core.gamestate.GameContent; import core.gamestate.GameContent;
import core.zone.Direction; import core.zone.Direction;
import core.zone.Translation; import core.zone.Translation;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import gameloop.ServerLoop; import gameloop.ServerLoop;
import java.util.Objects; import java.util.Objects;
...@@ -42,7 +42,7 @@ public class RelayerEntity extends Thread{ ...@@ -42,7 +42,7 @@ public class RelayerEntity extends Thread{
return; return;
} }
Event event = new MoveEvent(character.getID(), Translation.construct(direction,character.getSpeed())); Event event = new MoveEvent(character.getID(), Translation.construct(direction,character.getSpeed()));
DummyLocalGameLoop.getInstance().getNetworkConnection().sendEvent(event); LocalGameLoop.getInstance().sendEvent(event);
} }
private void stopMove(){ private void stopMove(){
......
...@@ -30,31 +30,31 @@ public class GameStarter { ...@@ -30,31 +30,31 @@ public class GameStarter {
NetworkConnection[] localConnections= LocalConnection.createNew(); NetworkConnection[] localConnections= LocalConnection.createNew();
NetworkConnection serverConnection = localConnections[0]; NetworkConnection serverConnection = localConnections[0];
NetworkConnection clientConnection = localConnections[1]; NetworkConnection clientConnection = localConnections[1];
DummyLocalGameLoop.getInstance().setNetworkConnection(clientConnection); LocalGameLoop.getInstance().setNetworkConnection(clientConnection);
//we are not allowing the LocalGameLoop to function here, commented the next line //we are not allowing the LocalGameLoop to function here, commented the next line
//DummyLocalGameLoop.getInstance().startGame(GameType.SINGLEPLAYER); //LocalGameLoop.getInstance().startGame(GameType.SINGLEPLAYER);
//but we start the thread nonetheless //but we start the thread nonetheless
if (!DummyLocalGameLoop.getInstance().startedBefore()) if (!LocalGameLoop.getInstance().startedBefore())
DummyLocalGameLoop.getInstance().start(); LocalGameLoop.getInstance().start();
//this is start and not run like in the DummyServer, because here we are dealing with a thread //this is start and not run like in the DummyServer, because here we are dealing with a thread
ServerLoop dummyServerLoop=new ServerLoop(serverConnection); ServerLoop dummyServerLoop=new ServerLoop(serverConnection);
dummyServerLoop.start(); dummyServerLoop.start();
//let the loop run now! //let the loop run now!
DummyLocalGameLoop.getInstance().startGame(); LocalGameLoop.getInstance().startGame();
} }
static public void startGameMultiplayerPlayer(String ip, int port) static public void startGameMultiplayerPlayer(String ip, int port)
{ {
NetworkConnection networkConnection=new ClientConnection(ip,port); NetworkConnection networkConnection=new ClientConnection(ip,port);
DummyLocalGameLoop.getInstance().setNetworkConnection(networkConnection); LocalGameLoop.getInstance().setNetworkConnection(networkConnection);
//Symmetric behavior, the same as with singlePlayerStartProcedure //Symmetric behavior, the same as with singlePlayerStartProcedure
if (!DummyLocalGameLoop.getInstance().startedBefore()) if (!LocalGameLoop.getInstance().startedBefore())
DummyLocalGameLoop.getInstance().start(); LocalGameLoop.getInstance().start();
//let the loop run now! //let the loop run now!
DummyLocalGameLoop.getInstance().startGame(); LocalGameLoop.getInstance().startGame();
} }
...@@ -64,8 +64,8 @@ public class GameStarter { ...@@ -64,8 +64,8 @@ public class GameStarter {
Logging.getInstance().getLogger().info("Leaving the game"); Logging.getInstance().getLogger().info("Leaving the game");
AIControler.killAll(); AIControler.killAll();
Relayers.killAll(); Relayers.killAll();
DummyLocalGameLoop.getInstance().getNetworkConnection().initiateConnectionEnd(); LocalGameLoop.getInstance().getNetworkConnection().initiateConnectionEnd();
DummyLocalGameLoop.getInstance().pauseGame(); LocalGameLoop.getInstance().pauseGame();
} }
static public void initiateBrokenConnectionMeasures() static public void initiateBrokenConnectionMeasures()
{ {
...@@ -78,6 +78,6 @@ public class GameStarter { ...@@ -78,6 +78,6 @@ public class GameStarter {
* @return the relayer of the instance the player is going to command * @return the relayer of the instance the player is going to command
*/ */
static public Relayer startGameBackup() { static public Relayer startGameBackup() {
return DummyLocalGameLoop.getInstance().getFollowedRelayer(); return LocalGameLoop.getInstance().getFollowedRelayer();
} }
} }
...@@ -12,6 +12,7 @@ import core.relayer.Relayers; ...@@ -12,6 +12,7 @@ import core.relayer.Relayers;
import graphics.graphical_abstraction.GraphicsMasterAbstraction; import graphics.graphical_abstraction.GraphicsMasterAbstraction;
import logging.Logging; import logging.Logging;
import network.helpers.EndEvent; import network.helpers.EndEvent;
import network.helpers.NetworkObject;
import network.inner_shell.NetworkConnection; import network.inner_shell.NetworkConnection;
...@@ -20,9 +21,9 @@ import java.util.logging.Logger; ...@@ -20,9 +21,9 @@ import java.util.logging.Logger;
/** /**
* Created by bogdanbear on 22/11/2015. * Created by bogdanbear on 22/11/2015.
Singleton class for the DummyLocalGameLoop Singleton class for the LocalGameLoop
*/ */
public class DummyLocalGameLoop extends Thread{ public class LocalGameLoop extends Thread{
private NetworkConnection networkConnection; private NetworkConnection networkConnection;
private GameContent gameContent; private GameContent gameContent;
//this is the counter which gives us the ID of the game //this is the counter which gives us the ID of the game
...@@ -109,7 +110,8 @@ public class DummyLocalGameLoop extends Thread{ ...@@ -109,7 +110,8 @@ public class DummyLocalGameLoop extends Thread{
return isPlaying; return isPlaying;
} }
public synchronized NetworkConnection getNetworkConnection() //default visibility for the getter, should be inaccessible to entities etc.
synchronized NetworkConnection getNetworkConnection()
{ {
return networkConnection; return networkConnection;
} }
...@@ -121,43 +123,48 @@ public class DummyLocalGameLoop extends Thread{ ...@@ -121,43 +123,48 @@ public class DummyLocalGameLoop extends Thread{
{ {
return gameContent; return gameContent;
} }
private static DummyLocalGameLoop ourInstance = new DummyLocalGameLoop(); private static LocalGameLoop ourInstance = new LocalGameLoop();
public static DummyLocalGameLoop getInstance() { public static LocalGameLoop getInstance() {
return ourInstance; return ourInstance;
} }
private DummyLocalGameLoop() { private LocalGameLoop() {
} }
@Override @Override
public void run() { public void run() {
LOGGER.info("DummyLocalGameLoop Thread started+"+currentThread().getId()); LOGGER.info("LocalGameLoop Thread started+"+currentThread().getId());
while (true) { while (true) {
//System.out.println("DummyLocalGameLoopThread, game is "+isPlaying); //System.out.println("DummyLocalGameLoopThread, game is "+isPlaying);
if (getIsPlaying()) { if (getIsPlaying()) {
//initially this is false! //initially this is false!
setShouldRPC(false); //setShouldRPC(false);
LOGGER.info("DummyLocalGameLoopThread,"+currentThread().getId()+ "game is "+isPlaying); LOGGER.info("DummyLocalGameLoopThread,"+currentThread().getId()+ "game is "+isPlaying);
Event eventToReceive = null; Event eventToReceive = null;
LOGGER.info("The game is on!"); LOGGER.info("The game is on!");
while (!((eventToReceive = (Event) getNetworkConnection().receiveEvent(true)) instanceof EndEvent)) { while (!((eventToReceive = (Event) getNetworkConnection().receiveEvent(true)) instanceof EndEvent)) {
//System.out.println("DummyLocalGameLoop Thread: We have received an event!applying...+"+eventToReceive); //System.out.println("LocalGameLoop Thread: We have received an event!applying...+"+eventToReceive);
try { try {
eventToReceive.apply(gameContent); eventToReceive.apply(gameContent);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
if (eventToReceive instanceof MapInit) { if (eventToReceive instanceof MapInit) {
<<<<<<< HEAD:src/gameloop/DummyLocalGameLoop.java
GameContent gc = DummyLocalGameLoop.getInstance().getContent(); GameContent gc = DummyLocalGameLoop.getInstance().getContent();
Entity e = ((MapInit) eventToReceive).getFollowedDummyEntity(); Entity e = ((MapInit) eventToReceive).getFollowedDummyEntity();
if(!(e instanceof Character)){ if(!(e instanceof Character)){
throw new RuntimeException("Player isn't a Character"); throw new RuntimeException("Player isn't a Character");
} }
Relayer firstEntityRelayer = Relayers.addFollowedRelayer((Character) e); Relayer firstEntityRelayer = Relayers.addFollowedRelayer((Character) e);
=======
GameContent gc = LocalGameLoop.getInstance().getContent();
Relayer firstEntityRelayer = Relayers.addFollowedRelayer(((MapInit) eventToReceive).getFollowedDummyEntity());
>>>>>>> 2e4aff744d47452287559898655bf326f6c9597c:src/gameloop/LocalGameLoop.java
setFollowedRelayer(firstEntityRelayer); setFollowedRelayer(firstEntityRelayer);
relayerSemaphore.release(); relayerSemaphore.release();
} }
if(eventToReceive instanceof MapChangeEvent){ if(eventToReceive instanceof MapChangeEvent){
GraphicsMasterAbstraction.getInstance().changeGUIStateTo(GraphicsMasterAbstraction.GUIStates.GAME_WIN); GraphicsMasterAbstraction.getInstance().changeGUIStateTo(GraphicsMasterAbstraction.GUIStates.GAME_WIN);
} }
if (eventToReceive instanceof ToClientDeathEvent && ((ToClientDeathEvent) eventToReceive).getEntityID()==followedRelayer.getCharacter().getID()) { if (eventToReceive instanceof ToClientDeathEvent && ((ToClientDeathEvent) eventToReceive).getEntityID()==followedRelayer.getCharacter().getID()) {
...@@ -168,20 +175,33 @@ public class DummyLocalGameLoop extends Thread{ ...@@ -168,20 +175,33 @@ public class DummyLocalGameLoop extends Thread{
LOGGER.info("End Event Received!"); LOGGER.info("End Event Received!");
} }
else { else {
try { try {
sleep(100); sleep(100);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
} }
public synchronized boolean isShouldRPC() {
return shouldRPC; /**
* Entities, relayers and objects related to the GameContent should not have a direct reference to the network connection
* this is why I insert here a sendEvent method
*/
public void sendEvent(NetworkObject event)
{
getNetworkConnection().sendEvent(event);
} }
public synchronized void setShouldRPC(boolean shouldRPC) { /**
this.shouldRPC = shouldRPC; * for compatibility reasons when changing visibility of getNetworkConnection(),
* we need to implement the following function
* **/
public boolean networkConnectionIsNull()
{
return(getNetworkConnection()==null);
} }
} }
...@@ -3,10 +3,7 @@ package graphics.display_test; ...@@ -3,10 +3,7 @@ package graphics.display_test;
/** /**
* Created by etouss on 06/01/2016. * Created by etouss on 06/01/2016.
*/ */
import artificial_intelligence.AIControler; import gameloop.LocalGameLoop;
import artificial_intelligence.AIEntities.AgressiveEntity;
import artificial_intelligence.AIEntities.EnumBehaviourType;
import gameloop.DummyLocalGameLoop;
import gameloop.GameStarter; import gameloop.GameStarter;
import graphics.graphical_abstraction.GraphicsMasterAbstraction; import graphics.graphical_abstraction.GraphicsMasterAbstraction;
import graphics.ingame_input_listener.Input; import graphics.ingame_input_listener.Input;
...@@ -39,6 +36,6 @@ public class GamePanelTermTest { ...@@ -39,6 +36,6 @@ public class GamePanelTermTest {
gm.changeGUIStateTo(GraphicsMasterAbstraction.GUIStates.GAME_PANEL); gm.changeGUIStateTo(GraphicsMasterAbstraction.GUIStates.GAME_PANEL);
gm.keyPressedHandler(Input.LEFT_ARROW); gm.keyPressedHandler(Input.LEFT_ARROW);
gm.keyPressedHandler(Input.UP_ARROW); gm.keyPressedHandler(Input.UP_ARROW);
assertEquals(DummyLocalGameLoop.getInstance().getFollowedRelayer().getDirection(), core.zone.Direction.LEFTUP); assertEquals(LocalGameLoop.getInstance().getFollowedRelayer().getDirection(), core.zone.Direction.LEFTUP);
} }
} }
package graphics.graphical_abstraction.panel; package graphics.graphical_abstraction.panel;
import core.relayer.Relayer; import core.relayer.Relayer;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import graphics.guiSkeleton.inputManagement.InputInterpreter; import graphics.guiSkeleton.inputManagement.InputInterpreter;
import graphics.ingame_input_listener.Input; import graphics.ingame_input_listener.Input;
...@@ -20,7 +20,7 @@ public class GamePanelAbstractionController { ...@@ -20,7 +20,7 @@ public class GamePanelAbstractionController {
} }
public void initialise(){ public void initialise(){
followedRelayer = DummyLocalGameLoop.getInstance().getFollowedRelayer(); followedRelayer = LocalGameLoop.getInstance().getFollowedRelayer();
MyInputInterpreter = new InputInterpreter(followedRelayer); MyInputInterpreter = new InputInterpreter(followedRelayer);
} }
......
...@@ -2,7 +2,7 @@ package graphics.guiSkeleton; ...@@ -2,7 +2,7 @@ package graphics.guiSkeleton;
import core.abilities.AbilityPackageInitialiser; import core.abilities.AbilityPackageInitialiser;
import core.abilities.effects.EffectPackageInitialiser; import core.abilities.effects.EffectPackageInitialiser;
import gameloop.DummyLocalGameLoop; import gameloop.LocalGameLoop;
import graphics.graphical_abstraction.GraphicsMasterAbstraction; import graphics.graphical_abstraction.GraphicsMasterAbstraction;
/** /**
...@@ -20,9 +20,9 @@ public class Igniter_Main { ...@@ -20,9 +20,9 @@ public class Igniter_Main {
EffectPackageInitialiser.initialisePackage(); EffectPackageInitialiser.initialisePackage();
//System.out.println(); //System.out.println();
/** launch the DummyLocalGameLoop**/ /** launch the LocalGameLoop**/
DummyLocalGameLoop.getInstance().setStartedBefore(); LocalGameLoop.getInstance().setStartedBefore();
DummyLocalGameLoop.getInstance().start(); LocalGameLoop.getInstance().start();