mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Compare commits
9 Commits
d2e1edab5c
...
289-server
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe57e53d2e | ||
|
|
43fb9e2faf | ||
|
|
4dfe503584 | ||
|
|
94e3fc71b8 | ||
|
|
9fcbe7d298 | ||
|
|
35f7a4fd13 | ||
|
|
e2132b549d | ||
|
|
9aefcb9b7b | ||
|
|
8146be16ed |
@@ -211,7 +211,7 @@ public final class Server {
|
|||||||
|
|
||||||
Player[] players = new Player[2];
|
Player[] players = new Player[2];
|
||||||
|
|
||||||
players[userStartingTurn] = new ArtificialPlayer(new MCTSAI3(100), user);
|
players[userStartingTurn] = new ArtificialPlayer(new MCTSAI3(1000), user);
|
||||||
players[opponentStartingTurn] = new OnlinePlayer(response.opponent());
|
players[opponentStartingTurn] = new OnlinePlayer(response.opponent());
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|||||||
@@ -2,9 +2,13 @@ package org.toop.app.canvas;
|
|||||||
|
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
import org.toop.app.App;
|
import org.toop.app.App;
|
||||||
|
import org.toop.framework.game.games.reversi.BitboardReversi;
|
||||||
|
import org.toop.framework.game.players.LocalPlayer;
|
||||||
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
||||||
|
|
||||||
public class ReversiBitCanvas extends BitGameCanvas {
|
public class ReversiBitCanvas extends BitGameCanvas {
|
||||||
|
private TurnBasedGame gameCopy;
|
||||||
|
private int previousCell;
|
||||||
public ReversiBitCanvas() {
|
public ReversiBitCanvas() {
|
||||||
super(Color.GRAY, new Color(0f, 0.4f, 0.2f, 1f), (App.getHeight() / 4) * 3, (App.getHeight() / 4) * 3, 8, 8, 5, true);
|
super(Color.GRAY, new Color(0f, 0.4f, 0.2f, 1f), (App.getHeight() / 4) * 3, (App.getHeight() / 4) * 3, 8, 8, 5, true);
|
||||||
canvas.setOnMouseMoved(event -> {
|
canvas.setOnMouseMoved(event -> {
|
||||||
@@ -20,6 +24,9 @@ public class ReversiBitCanvas extends BitGameCanvas {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hovered != null) {
|
||||||
|
checkHoverDots(hovered, cellId);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,9 +38,31 @@ public class ReversiBitCanvas extends BitGameCanvas {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void redraw(TurnBasedGame gameCopy) {
|
public void redraw(TurnBasedGame gameCopy) {
|
||||||
|
this.gameCopy = gameCopy;
|
||||||
clearAll();
|
clearAll();
|
||||||
long[] board = gameCopy.getBoard();
|
long[] board = gameCopy.getBoard();
|
||||||
loopOverBoard(board[0], (i) -> drawDot(Color.WHITE, i));
|
loopOverBoard(board[0], (i) -> drawDot(Color.WHITE, i));
|
||||||
loopOverBoard(board[1], (i) -> drawDot(Color.BLACK, i));
|
loopOverBoard(board[1], (i) -> drawDot(Color.BLACK, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void drawLegalDots(TurnBasedGame gameCopy){
|
||||||
|
long legal = gameCopy.getLegalMoves();
|
||||||
|
loopOverBoard(legal, (i) -> drawInnerDot(gameCopy.getCurrentTurn()==0?new Color(1f,1f,1f,0.65f) :new Color(0f,0f,0f,0.65f), i,false));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void checkHoverDots(BitGameCanvas.Cell hovered, int cellId){
|
||||||
|
if (previousCell == cellId){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
long backflips = ((BitboardReversi)gameCopy).getFlips(1L << previousCell);
|
||||||
|
loopOverBoard(backflips, (i) -> drawInnerDot(gameCopy.getCurrentTurn()==1?Color.WHITE:Color.BLACK, i,true));
|
||||||
|
previousCell = cellId;
|
||||||
|
if (gameCopy.getPlayer(gameCopy.getCurrentTurn()) instanceof LocalPlayer) {
|
||||||
|
long legal = gameCopy.getLegalMoves();
|
||||||
|
if ((legal & (1L << cellId)) != 0) {
|
||||||
|
long flips = ((BitboardReversi) gameCopy).getFlips(1L << cellId);
|
||||||
|
loopOverBoard(flips, (i) -> drawInnerDot(gameCopy.getCurrentTurn() == 0 ? Color.WHITE : Color.BLACK, i, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import javafx.geometry.Pos;
|
|||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import org.toop.app.canvas.GameCanvas;
|
import org.toop.app.canvas.GameCanvas;
|
||||||
|
import org.toop.app.canvas.ReversiBitCanvas;
|
||||||
import org.toop.app.widget.WidgetContainer;
|
import org.toop.app.widget.WidgetContainer;
|
||||||
import org.toop.app.widget.view.GameView;
|
import org.toop.app.widget.view.GameView;
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
import org.toop.framework.eventbus.EventFlow;
|
||||||
@@ -153,6 +154,12 @@ public class GenericGameController implements GameController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateUI() {
|
public void updateUI() {
|
||||||
canvas.redraw(game.deepCopy());
|
TurnBasedGame gameCopy = game.deepCopy();
|
||||||
|
canvas.redraw(gameCopy);
|
||||||
|
String gameType = game.getClass().getSimpleName().replace("Bitboard","");
|
||||||
|
gameView.nextPlayer(true, getCurrentPlayer().getName(), game.getPlayer(1-getCurrentPlayerIndex()).getName(),gameType);
|
||||||
|
if (getCurrentPlayer() instanceof LocalPlayer && gameType.equals("Reversi")){
|
||||||
|
((ReversiBitCanvas)canvas).drawLegalDots(gameCopy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import javafx.scene.text.Font;
|
|||||||
import org.toop.app.widget.Primitive;
|
import org.toop.app.widget.Primitive;
|
||||||
import org.toop.app.widget.complex.ViewWidget;
|
import org.toop.app.widget.complex.ViewWidget;
|
||||||
import org.toop.app.widget.popup.GameOverPopup;
|
import org.toop.app.widget.popup.GameOverPopup;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
@@ -94,7 +96,7 @@ public final class GameView extends ViewWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void nextPlayer(boolean isMe, String currentPlayer, String currentMove, String nextPlayer, char GameType) {
|
public void nextPlayer(boolean isMe, String currentPlayer, String nextPlayer, String GameType) {
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
if (!(hasSet)) {
|
if (!(hasSet)) {
|
||||||
playerHeader.setText(currentPlayer + " vs. " + nextPlayer);
|
playerHeader.setText(currentPlayer + " vs. " + nextPlayer);
|
||||||
@@ -112,8 +114,8 @@ public final class GameView extends ViewWidget {
|
|||||||
new GameOverPopup(iWon, winner).show(Pos.CENTER);
|
new GameOverPopup(iWon, winner).show(Pos.CENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setPlayerHeaders(boolean isMe, String currentPlayer, String nextPlayer, char GameType) {
|
private void setPlayerHeaders(boolean isMe, String currentPlayer, String nextPlayer, String GameType) {
|
||||||
if (GameType == 'T') {
|
if (Objects.equals(GameType, "TicTacToe")) {
|
||||||
if (isMe) {
|
if (isMe) {
|
||||||
player1Header.setText("X: " + currentPlayer);
|
player1Header.setText("X: " + currentPlayer);
|
||||||
player2Header.setText("O: " + nextPlayer);
|
player2Header.setText("O: " + nextPlayer);
|
||||||
@@ -124,7 +126,7 @@ public final class GameView extends ViewWidget {
|
|||||||
}
|
}
|
||||||
setPlayerInfoTTT();
|
setPlayerInfoTTT();
|
||||||
}
|
}
|
||||||
else if (GameType == 'R') {
|
else if (Objects.equals(GameType, "Reversi")) {
|
||||||
if (isMe) {
|
if (isMe) {
|
||||||
player1Header.setText(currentPlayer);
|
player1Header.setText(currentPlayer);
|
||||||
player2Header.setText(nextPlayer);
|
player2Header.setText(nextPlayer);
|
||||||
@@ -172,8 +174,8 @@ public final class GameView extends ViewWidget {
|
|||||||
|
|
||||||
player1Icon.setRadius(player1Header.fontProperty().map(Font::getSize).getValue());
|
player1Icon.setRadius(player1Header.fontProperty().map(Font::getSize).getValue());
|
||||||
player2Icon.setRadius(player2Header.fontProperty().map(Font::getSize).getValue());
|
player2Icon.setRadius(player2Header.fontProperty().map(Font::getSize).getValue());
|
||||||
player1Icon.setFill(Color.BLACK);
|
player1Icon.setFill(Color.WHITE);
|
||||||
player2Icon.setFill(Color.WHITE);
|
player2Icon.setFill(Color.BLACK);
|
||||||
add(Pos.TOP_RIGHT, playerInfo);
|
add(Pos.TOP_RIGHT, playerInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ public class LocalMultiplayerView extends ViewWidget {
|
|||||||
if (information.players[1].isHuman) {
|
if (information.players[1].isHuman) {
|
||||||
players[1] = new LocalPlayer(information.players[1].name);
|
players[1] = new LocalPlayer(information.players[1].name);
|
||||||
} else {
|
} else {
|
||||||
players[1] = new ArtificialPlayer(new MCTSAI2(50), "MCTS V2 AI");
|
players[1] = new ArtificialPlayer(new MCTSAI(50), "MCTS V1 AI");
|
||||||
}
|
}
|
||||||
if (AppSettings.getSettings().getTutorialFlag() && AppSettings.getSettings().getFirstReversi()) {
|
if (AppSettings.getSettings().getTutorialFlag() && AppSettings.getSettings().getFirstReversi()) {
|
||||||
new ShowEnableTutorialWidget(
|
new ShowEnableTutorialWidget(
|
||||||
|
|||||||
@@ -1,31 +1,39 @@
|
|||||||
package org.toop.framework.game.gameThreads;
|
package org.toop.framework.game.gameThreads;
|
||||||
|
|
||||||
import org.toop.framework.eventbus.EventFlow;
|
|
||||||
import org.toop.framework.gameFramework.GameState;
|
import org.toop.framework.gameFramework.GameState;
|
||||||
import org.toop.framework.gameFramework.model.game.PlayResult;
|
import org.toop.framework.gameFramework.model.game.PlayResult;
|
||||||
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
||||||
import org.toop.framework.gameFramework.model.game.threadBehaviour.AbstractThreadBehaviour;
|
import org.toop.framework.gameFramework.model.game.threadBehaviour.AbstractThreadBehaviour;
|
||||||
import org.toop.framework.gameFramework.model.player.Player;
|
import org.toop.framework.gameFramework.model.player.Player;
|
||||||
import org.toop.framework.gameFramework.view.GUIEvents;
|
|
||||||
import org.toop.framework.utils.ImmutablePair;
|
import org.toop.framework.utils.ImmutablePair;
|
||||||
import org.toop.framework.utils.Pair;
|
import org.toop.framework.utils.Pair;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.concurrent.*;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
import static org.toop.framework.gameFramework.GameState.TURN_SKIPPED;
|
|
||||||
import static org.toop.framework.gameFramework.GameState.WIN;
|
|
||||||
|
|
||||||
public class ServerThreadBehaviour extends AbstractThreadBehaviour implements Runnable {
|
public class ServerThreadBehaviour extends AbstractThreadBehaviour implements Runnable {
|
||||||
private final Consumer<ImmutablePair<String, Integer>> onPlayerMove;
|
private final Consumer<ImmutablePair<String, Integer>> onPlayerMove;
|
||||||
private final Consumer<Pair<GameState, Integer>> onGameEnd;
|
private final Consumer<Pair<GameState, Integer>> onGameEnd;
|
||||||
|
|
||||||
|
private final ExecutorService moveExecutor = Executors.newSingleThreadExecutor();
|
||||||
|
|
||||||
|
private final Duration timeOut;
|
||||||
/**
|
/**
|
||||||
* Creates a new base behaviour for the specified game.
|
* Creates a new base behaviour for the specified game.
|
||||||
*
|
*
|
||||||
* @param game the turn-based game to control
|
* @param game the turn-based game to control
|
||||||
*/
|
*/
|
||||||
public ServerThreadBehaviour(TurnBasedGame game, Consumer<ImmutablePair<String, Integer>> onPlayerMove, Consumer<Pair<GameState, Integer>> onGameEnd) {
|
public ServerThreadBehaviour(
|
||||||
|
TurnBasedGame game,
|
||||||
|
Consumer<ImmutablePair<String,
|
||||||
|
Integer>> onPlayerMove,
|
||||||
|
Consumer<Pair<GameState, Integer>> onGameEnd,
|
||||||
|
Duration timeOut
|
||||||
|
) {
|
||||||
this.onPlayerMove = onPlayerMove;
|
this.onPlayerMove = onPlayerMove;
|
||||||
this.onGameEnd = onGameEnd;
|
this.onGameEnd = onGameEnd;
|
||||||
|
this.timeOut = timeOut;
|
||||||
super(game);
|
super(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,23 +67,42 @@ public class ServerThreadBehaviour extends AbstractThreadBehaviour implements Ru
|
|||||||
public void run() {
|
public void run() {
|
||||||
while (isRunning.get()) {
|
while (isRunning.get()) {
|
||||||
Player currentPlayer = game.getPlayer(game.getCurrentTurn());
|
Player currentPlayer = game.getPlayer(game.getCurrentTurn());
|
||||||
long move = currentPlayer.getMove(game.deepCopy());
|
|
||||||
PlayResult result = game.play(move);
|
|
||||||
|
|
||||||
GameState state = result.state();
|
Future<Long> move = moveExecutor.submit(() -> currentPlayer.getMove(game.deepCopy()));
|
||||||
notifyPlayerMove(new ImmutablePair<>(currentPlayer.getName(), Long.numberOfTrailingZeros(move)));
|
|
||||||
|
|
||||||
switch (state) {
|
PlayResult result;
|
||||||
case WIN, DRAW -> {
|
try {
|
||||||
isRunning.set(false);
|
long moveResult = move.get(timeOut.toMillis(), TimeUnit.MILLISECONDS);
|
||||||
notifyGameEnd(new ImmutablePair<>(state, game.getWinner()));
|
result = game.play(moveResult);
|
||||||
}
|
|
||||||
case NORMAL, TURN_SKIPPED -> { /* continue normally */ }
|
GameState state = result.state();
|
||||||
default -> {
|
notifyPlayerMove(new ImmutablePair<>(currentPlayer.getName(), Long.numberOfTrailingZeros(moveResult)));
|
||||||
logger.error("Unexpected state {}", state);
|
|
||||||
isRunning.set(false);
|
switch (state) {
|
||||||
throw new RuntimeException("Unknown state: " + state);
|
case WIN, DRAW -> {
|
||||||
|
isRunning.set(false);
|
||||||
|
moveExecutor.shutdown();
|
||||||
|
notifyGameEnd(new ImmutablePair<>(state, game.getWinner()));
|
||||||
|
}
|
||||||
|
case NORMAL, TURN_SKIPPED -> { /* continue normally */ }
|
||||||
|
default -> {
|
||||||
|
logger.error("Unexpected state {}", state);
|
||||||
|
isRunning.set(false);
|
||||||
|
moveExecutor.shutdown();
|
||||||
|
throw new RuntimeException("Unknown state: " + state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
isRunning.set(false);
|
||||||
|
notifyGameEnd(new ImmutablePair<>(GameState.DRAW, 0));
|
||||||
|
moveExecutor.shutdown();
|
||||||
|
return;
|
||||||
|
} catch (TimeoutException e) {
|
||||||
|
isRunning.set(false);
|
||||||
|
notifyGameEnd(new ImmutablePair<>(GameState.WIN, 1+game.getWinner()%2));
|
||||||
|
moveExecutor.shutdown();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,13 +29,8 @@ public class ServerPlayer extends AbstractPlayer {
|
|||||||
@Override
|
@Override
|
||||||
public long determineMove(TurnBasedGame game) {
|
public long determineMove(TurnBasedGame game) {
|
||||||
lastMove = new CompletableFuture<>();
|
lastMove = new CompletableFuture<>();
|
||||||
System.out.println("Sending yourturn");
|
|
||||||
client.send("SVR GAME YOURTURN {TURNMESSAGE: \"<bericht voor deze beurt>\"}\n");
|
client.send("SVR GAME YOURTURN {TURNMESSAGE: \"<bericht voor deze beurt>\"}");
|
||||||
try {
|
return lastMove.join();
|
||||||
return lastMove.get();
|
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import org.toop.framework.gameFramework.GameState;
|
|||||||
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
import org.toop.framework.gameFramework.model.game.TurnBasedGame;
|
||||||
import org.toop.framework.networking.server.client.NettyClient;
|
import org.toop.framework.networking.server.client.NettyClient;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.time.Duration;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@@ -19,12 +19,13 @@ public class OnlineTurnBasedGame implements OnlineGame<TurnBasedGame> {
|
|||||||
|
|
||||||
private final CompletableFuture<Integer> resultFuture;
|
private final CompletableFuture<Integer> resultFuture;
|
||||||
|
|
||||||
public OnlineTurnBasedGame(NettyClient[] admins, TurnBasedGame game, CompletableFuture<Integer> resultFuture, NettyClient... clients) {
|
public OnlineTurnBasedGame(NettyClient[] admins, TurnBasedGame game, CompletableFuture<Integer> resultFuture, Duration timeOut, NettyClient... clients) {
|
||||||
this.game = game;
|
this.game = game;
|
||||||
this.gameThread = new ServerThreadBehaviour(
|
this.gameThread = new ServerThreadBehaviour(
|
||||||
game,
|
game,
|
||||||
(pair) -> notifyMoveMade(pair.getLeft(), pair.getRight()),
|
(pair) -> notifyMoveMade(pair.getLeft(), pair.getRight()),
|
||||||
(pair) -> notifyGameEnd(pair.getLeft(), pair.getRight())
|
(pair) -> notifyGameEnd(pair.getLeft(), pair.getRight()),
|
||||||
|
timeOut
|
||||||
);
|
);
|
||||||
this.resultFuture = resultFuture;
|
this.resultFuture = resultFuture;
|
||||||
this.clients = clients;
|
this.clients = clients;
|
||||||
@@ -42,17 +43,15 @@ public class OnlineTurnBasedGame implements OnlineGame<TurnBasedGame> {
|
|||||||
|
|
||||||
private void notifyGameEnd(GameState state, int winner) {
|
private void notifyGameEnd(GameState state, int winner) {
|
||||||
if (state == GameState.DRAW) {
|
if (state == GameState.DRAW) {
|
||||||
Arrays.stream(admins).forEach(a -> a.send(
|
Arrays.stream(admins).forEach(a -> a.send("SVR GAME END"));
|
||||||
String.format("SVR GAME END")
|
|
||||||
));
|
|
||||||
|
|
||||||
for (NettyClient client : clients) {
|
for (NettyClient client : clients) {
|
||||||
client.send(String.format("SVR GAME DRAW {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}"));
|
client.send("SVR GAME DRAW {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Arrays.stream(admins).forEach(a -> a.send("SVR GAME END"));
|
Arrays.stream(admins).forEach(a -> a.send("SVR GAME END"));
|
||||||
clients[winner].send(String.format("SVR GAME WIN {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}"));
|
clients[winner].send("SVR GAME WIN {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}");
|
||||||
clients[(winner+1)%2].send(String.format("SVR GAME LOSS {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}"));
|
clients[(winner+1)%2].send("SVR GAME LOSS {PLAYERONESCORE: \"<score speler1>\", PLAYERTWOSCORE: \"<score speler2>\", COMMENT: \"<comment>\"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove game from clients
|
// Remove game from clients
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ public class Server implements GameServer<TurnBasedGame, NettyClient, Long> {
|
|||||||
getAdmins().toArray(NettyClient[]::new),
|
getAdmins().toArray(NettyClient[]::new),
|
||||||
gameTypesStore.create(gameType),
|
gameTypesStore.create(gameType),
|
||||||
gameResult,
|
gameResult,
|
||||||
|
turnTime,
|
||||||
clients
|
clients
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -166,6 +167,7 @@ public class Server implements GameServer<TurnBasedGame, NettyClient, Long> {
|
|||||||
clients[0].name(),
|
clients[0].name(),
|
||||||
gameType,
|
gameType,
|
||||||
clients[0].name()));
|
clients[0].name()));
|
||||||
|
|
||||||
game.start();
|
game.start();
|
||||||
return grfReturn;
|
return grfReturn;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user