Commit 29e1cc00 authored by bogdanbear's avatar bogdanbear

Merge remote-tracking branch 'origin/master'

parents 659c4465 cdb3a89b
...@@ -304,7 +304,7 @@ public abstract class AbstractEntity extends Thread { ...@@ -304,7 +304,7 @@ public abstract class AbstractEntity extends Thread {
try{ try{
Thread.sleep(ServerLoop.frame - (ctime - ltime)); Thread.sleep(ServerLoop.frame - (ctime - ltime));
}catch(InterruptedException e){ }catch(InterruptedException e){
//System.out.println("got interrupted!"); //Logging.getInstance().getLogger().info("got interrupted!");
} }
} }
} }
......
...@@ -20,7 +20,7 @@ public class EffectPackageInitialiser { ...@@ -20,7 +20,7 @@ public class EffectPackageInitialiser {
Logging.getInstance().getLogger().info("Initialising package effects..."); Logging.getInstance().getLogger().info("Initialising package effects...");
EffectFactory.getInstance(); EffectFactory.getInstance();
for (EffectKey unregisteredEffectKey : EffectFactory.getInstance().checkEffectKeyRegisteringExhaustivity()) { for (EffectKey unregisteredEffectKey : EffectFactory.getInstance().checkEffectKeyRegisteringExhaustivity()) {
System.out.println("* Warning: EffectKey not registered in EffectFactory: \"" + unregisteredEffectKey.name() + "\""); Logging.getInstance().getLogger().info("* Warning: EffectKey not registered in EffectFactory: \"" + unregisteredEffectKey.name() + "\"");
} }
Logging.getInstance().getLogger().info("...package effects initialised"); Logging.getInstance().getLogger().info("...package effects initialised");
} }
......
...@@ -72,7 +72,7 @@ public class GameContent implements Serializable{ ...@@ -72,7 +72,7 @@ public class GameContent implements Serializable{
Relayer followerRelayer = Relayers.addNewRelayer(follower); Relayer followerRelayer = Relayers.addNewRelayer(follower);
AIControler.add(this, followerRelayer, EnumBehaviourType.Follower); AIControler.add(this, followerRelayer, EnumBehaviourType.Follower);
} }
System.out.println("GameContent class: One gameContent created by"+Thread.currentThread().getId()); Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId()); Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
} }
...@@ -192,7 +192,7 @@ public class GameContent implements Serializable{ ...@@ -192,7 +192,7 @@ public class GameContent implements Serializable{
for(Character player: players){ for(Character player: players){
player.setXY(posX, posY); player.setXY(posX, posY);
} }
System.out.println("GameContent class: One gameContent created by"+Thread.currentThread().getId()); Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId()); Logging.getInstance().getLogger().info("GameContent class: One gameContent created by"+Thread.currentThread().getId());
} }
......
...@@ -120,7 +120,6 @@ public class SpeciesArray { ...@@ -120,7 +120,6 @@ public class SpeciesArray {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(array); System.out.println(array);
} }
/** /**
* Beware, throw an exception with the given message ! * Beware, throw an exception with the given message !
* @param message * @param message
......
...@@ -215,7 +215,7 @@ public class Circle implements Zone { ...@@ -215,7 +215,7 @@ public class Circle implements Zone {
return "Circle : "+ center.toString() + " Radius:" + radius ; return "Circle : "+ center.toString() + " Radius:" + radius ;
} }
public static void main(String[] args) { public static void main(String[] args) {
Circle c=new Circle(Point.construct(3,3),3); Circle c=new Circle(Point.construct(3,3),3);
System.out.println(c.getBorderPoint(Direction.LEFT)); System.out.println(c.getBorderPoint(Direction.LEFT));
......
...@@ -124,7 +124,6 @@ public class ServerLoop extends Thread { ...@@ -124,7 +124,6 @@ public class ServerLoop extends Thread {
* */ * */
void executeFrame(GameContent gameContent) throws InterruptedException { void executeFrame(GameContent gameContent) throws InterruptedException {
while (!(queue.isEmpty()) && queue.peek().getTime() == cframe) { while (!(queue.isEmpty()) && queue.peek().getTime() == cframe) {
//System.out.println("Coucou, local execution");
Event event = queue.poll().getEvent(); Event event = queue.poll().getEvent();
Event toBeSentToClientsEvent = event.apply(gameContent); Event toBeSentToClientsEvent = event.apply(gameContent);
networkConnection.sendEvent(toBeSentToClientsEvent); networkConnection.sendEvent(toBeSentToClientsEvent);
......
...@@ -2,6 +2,7 @@ package graphics.graphical_utility; ...@@ -2,6 +2,7 @@ package graphics.graphical_utility;
import core.zone.Point; import core.zone.Point;
import graphics.guiSkeleton.mapManagement.GraphicsMapPoint; import graphics.guiSkeleton.mapManagement.GraphicsMapPoint;
import logging.Logging;
/** /**
* Created by etouss on 20/12/2015. * Created by etouss on 20/12/2015.
...@@ -26,7 +27,7 @@ public final class GraphicalBridgeConfiguration { ...@@ -26,7 +27,7 @@ public final class GraphicalBridgeConfiguration {
//For checking the core2Graphics method //For checking the core2Graphics method
public static void main(String[] args){ public static void main(String[] args){
System.out.println("DistanceConverterCheck: Input="+50+", Output="+ core2Graphics(50)); Logging.getInstance().getLogger().info("DistanceConverterCheck: Input="+50+", Output="+ core2Graphics(50));
} }
/** /**
......
...@@ -4,6 +4,7 @@ import core.abilities.AbilityPackageInitialiser; ...@@ -4,6 +4,7 @@ import core.abilities.AbilityPackageInitialiser;
import core.abilities.effects.EffectPackageInitialiser; import core.abilities.effects.EffectPackageInitialiser;
import gameloop.LocalGameLoop; import gameloop.LocalGameLoop;
import graphics.graphical_abstraction.GraphicsMasterAbstraction; import graphics.graphical_abstraction.GraphicsMasterAbstraction;
import logging.Logging;
/** /**
* Created by dupriez on 10/11/15. * Created by dupriez on 10/11/15.
...@@ -27,7 +28,7 @@ public class Igniter_Main { ...@@ -27,7 +28,7 @@ public class Igniter_Main {
/** Launch the GUI (and thus the game) **/ /** Launch the GUI (and thus the game) **/
GraphicsMaster.build(); GraphicsMaster.build();
GraphicsMasterAbstraction gm = GraphicsMasterAbstraction.getInstance(); GraphicsMasterAbstraction gm = GraphicsMasterAbstraction.getInstance();
System.out.println("Starting GUI..."); Logging.getInstance().getLogger().info("Starting GUI...");
gm.launchGUI(); gm.launchGUI();
} }
} }
...@@ -7,6 +7,7 @@ import graphics.guiSkeleton.GraphicsMaster; ...@@ -7,6 +7,7 @@ import graphics.guiSkeleton.GraphicsMaster;
import graphics.guiSkeleton.guiPanel.menuPanel.facilities.ButtonMaker; import graphics.guiSkeleton.guiPanel.menuPanel.facilities.ButtonMaker;
import graphics.guiSkeleton.guiPanel.menuPanel.facilities.MenuPanel; import graphics.guiSkeleton.guiPanel.menuPanel.facilities.MenuPanel;
import graphics.ingame_input_listener.Input; import graphics.ingame_input_listener.Input;
import logging.Logging;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
...@@ -86,7 +87,7 @@ public class MainMenuPanel extends MenuPanel implements MainMenuPanelAbstraction ...@@ -86,7 +87,7 @@ public class MainMenuPanel extends MenuPanel implements MainMenuPanelAbstraction
@Override @Override
public void initialise() { public void initialise() {
// underlyingMainMenuPanel.setPreferredSize(new Dimension(getSize().width, getSize().height)); // underlyingMainMenuPanel.setPreferredSize(new Dimension(getSize().width, getSize().height));
// System.out.println("Dimensions= "+getSize().width+", "+getSize().height); // Logging.getInstance().getLogger().info"Dimensions= "+getSize().width+", "+getSize().height);
// setSize(new Dimension(getSize().width, getSize().height)); // setSize(new Dimension(getSize().width, getSize().height));
} }
......
...@@ -3,6 +3,7 @@ package ingame_programming; ...@@ -3,6 +3,7 @@ package ingame_programming;
import java.io.InputStream; import java.io.InputStream;
import java.util.*; import java.util.*;
import core.gamestate.GameState; import core.gamestate.GameState;
import logging.Logging;
import core.gamestate.Character; import core.gamestate.Character;
/** /**
* This class is used to register data from IGPpanel. * This class is used to register data from IGPpanel.
...@@ -278,13 +279,13 @@ public class FollowerBehaviour { ...@@ -278,13 +279,13 @@ public class FollowerBehaviour {
/** A debug fonction that allows to Print the Instructions according to the FollowerBehaviour */ /** A debug fonction that allows to Print the Instructions according to the FollowerBehaviour */
public void PrintElements() { public void PrintElements() {
for(int i = 0; i< numberOfRules; i++) { for(int i = 0; i< numberOfRules; i++) {
System.out.println("Instruction number" + i); Logging.getInstance().getLogger().info("Instruction number" + i);
System.out.println(" Action :" + actions[i]); Logging.getInstance().getLogger().info(" Action :" + actions[i]);
String s = " Target :"; String s = " Target :";
for (String t : targets.get(i)) { for (String t : targets.get(i)) {
s = s + " " + t; s = s + " " + t;
} }
System.out.println(s); Logging.getInstance().getLogger().info(s);
} }
} }
} }
package ingame_programming; package ingame_programming;
import graphics.ingame_input_listener.Input; import graphics.ingame_input_listener.Input;
import logging.Logging;
import graphics.guiSkeleton.GUIColorsAndFonts; import graphics.guiSkeleton.GUIColorsAndFonts;
import graphics.guiSkeleton.GraphicsMaster; import graphics.guiSkeleton.GraphicsMaster;
import javax.swing.*; import javax.swing.*;
...@@ -25,7 +26,7 @@ import core.abilities.AbilityKey; ...@@ -25,7 +26,7 @@ import core.abilities.AbilityKey;
public class TestIGP { public class TestIGP {
public static void main(String argv[]) throws ParseException { public static void main(String argv[]) throws ParseException {
System.out.println("Bonjour"); Logging.getInstance().getLogger().info("Bonjour");
FollowerBehaviour fb = new FollowerBehaviour(4); FollowerBehaviour fb = new FollowerBehaviour(4);
Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non avec MEN < 50)) ou avec DEF = 50")); Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non avec MEN < 50)) ou avec DEF = 50"));
ArrayList<String> targett = parser.checkInput(); ArrayList<String> targett = parser.checkInput();
......
package ingame_programming; package ingame_programming;
import graphics.ingame_input_listener.Input; import graphics.ingame_input_listener.Input;
import logging.Logging;
import graphics.guiSkeleton.GUIColorsAndFonts; import graphics.guiSkeleton.GUIColorsAndFonts;
import graphics.guiSkeleton.GraphicsMaster; import graphics.guiSkeleton.GraphicsMaster;
import javax.swing.*; import javax.swing.*;
...@@ -25,7 +26,7 @@ import core.abilities.AbilityKey; ...@@ -25,7 +26,7 @@ import core.abilities.AbilityKey;
public class Testig { public class Testig {
public static void main(String argv[]) throws ParseException { public static void main(String argv[]) throws ParseException {
System.out.println("Bonjour"); Logging.getInstance().getLogger().info("Bonjour");
Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non possedant potion)) ou avec DEF = 50")); Script parser = new Script(stringToStream("attaque ennemi (avec PV < 50% et (avec DEF < 50 ou non possedant potion)) ou avec DEF = 50"));
parser.Instruction(); parser.Instruction();
Zone zone = EmptyZone.getEmptyZone(); Zone zone = EmptyZone.getEmptyZone();
......
...@@ -38,7 +38,6 @@ public class MapGenerationTestMain { ...@@ -38,7 +38,6 @@ public class MapGenerationTestMain {
} }
System.out.print(s); System.out.print(s);
} }
System.out.println();
} }
} }
......
...@@ -17,7 +17,6 @@ public class TestEvent implements Event{ ...@@ -17,7 +17,6 @@ public class TestEvent implements Event{
} }
@Override @Override
public boolean execute(GameContent gameContent) { public boolean execute(GameContent gameContent) {
//System.out.println("TestEvent: Executing vital stuff...");
return true; return true;
} }
......
...@@ -123,7 +123,7 @@ public class ServerConnectionTest{ ...@@ -123,7 +123,7 @@ public class ServerConnectionTest{
@Test @Test
public void testSendEvents(){ public void testSendEvents(){
try{ try{
System.out.println(server); //System.out.println(server);
server.sendEvent(e); server.sendEvent(e);
ObjectForTest event1 = (ObjectForTest)client1.getInputStream().readObject(); ObjectForTest event1 = (ObjectForTest)client1.getInputStream().readObject();
ObjectForTest event2 = (ObjectForTest)client2.getInputStream().readObject(); ObjectForTest event2 = (ObjectForTest)client2.getInputStream().readObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment