mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-01 07:39:35 +01:00
Legger til en test server i RoboRallyWrapper
This commit is contained in:
parent
b0ebb2db3e
commit
08e2a61457
@ -3,8 +3,13 @@ package inf112.fiasko.roborally.game_wrapper;
|
|||||||
import com.badlogic.gdx.Game;
|
import com.badlogic.gdx.Game;
|
||||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
||||||
|
import inf112.fiasko.roborally.networking.RoboRallyClient;
|
||||||
|
import inf112.fiasko.roborally.networking.RoboRallyServer;
|
||||||
|
import inf112.fiasko.roborally.networking.SomeResponse;
|
||||||
import inf112.fiasko.roborally.objects.IDrawableGame;
|
import inf112.fiasko.roborally.objects.IDrawableGame;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
public class RoboRallyWrapper extends Game {
|
public class RoboRallyWrapper extends Game {
|
||||||
public SpriteBatch batch;
|
public SpriteBatch batch;
|
||||||
public BitmapFont font;
|
public BitmapFont font;
|
||||||
@ -17,6 +22,15 @@ public class RoboRallyWrapper extends Game {
|
|||||||
font = new BitmapFont();
|
font = new BitmapFont();
|
||||||
this.screenManager = new ScreenManager();
|
this.screenManager = new ScreenManager();
|
||||||
this.setScreen(screenManager.getMainMenuScreen(this));
|
this.setScreen(screenManager.getMainMenuScreen(this));
|
||||||
|
try {
|
||||||
|
RoboRallyServer server = new RoboRallyServer();
|
||||||
|
RoboRallyClient client = new RoboRallyClient();
|
||||||
|
SomeResponse response = new SomeResponse();
|
||||||
|
response.text = "ÆÆÆÆÆÆÆÆÆ";
|
||||||
|
server.sendToAllClients(response);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user