mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Tests and better instantiation
This commit is contained in:
@@ -141,17 +141,6 @@ public final class App extends Application {
|
||||
}
|
||||
|
||||
stage.show();
|
||||
|
||||
var games = new ConcurrentHashMap<String, Class<? extends TurnBasedGame>>();
|
||||
games.put("tictactoe", BitboardReversi.class);
|
||||
games.put("reversi", BitboardReversi.class);
|
||||
var s = new MasterServer(6666, games);
|
||||
try {
|
||||
s.start();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void setKeybinds(StackPane root) {
|
||||
|
||||
@@ -10,7 +10,8 @@ import org.toop.framework.game.players.OnlinePlayer;
|
||||
|
||||
public class ReversiBitController extends GenericGameController {
|
||||
public ReversiBitController(Player[] players) {
|
||||
BitboardReversi game = new BitboardReversi(players);
|
||||
BitboardReversi game = new BitboardReversi();
|
||||
game.init(players);
|
||||
ThreadBehaviour thread = new LocalThreadBehaviour(game);
|
||||
for (Player player : players) {
|
||||
if (player instanceof OnlinePlayer){
|
||||
|
||||
@@ -10,7 +10,8 @@ import org.toop.framework.game.players.OnlinePlayer;
|
||||
|
||||
public class TicTacToeBitController extends GenericGameController {
|
||||
public TicTacToeBitController(Player[] players) {
|
||||
BitboardTicTacToe game = new BitboardTicTacToe(players);
|
||||
BitboardTicTacToe game = new BitboardTicTacToe();
|
||||
game.init(players);
|
||||
ThreadBehaviour thread = new LocalThreadBehaviour(game);
|
||||
for (Player player : players) {
|
||||
if (player instanceof OnlinePlayer){
|
||||
|
||||
Reference in New Issue
Block a user