mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +00:00
Fixed old new EventFlow().listen() missing false as third param
This commit is contained in:
@@ -94,11 +94,14 @@ public final class Server {
|
||||
primary = new ServerView(user, this::sendChallenge, this::disconnect);
|
||||
WidgetContainer.getCurrentView().transitionNext(primary);
|
||||
|
||||
startPopulateScheduler();
|
||||
populateGameList();
|
||||
|
||||
}).postEvent();
|
||||
new EventFlow().listen(NetworkEvents.ChallengeResponse.class, this::handleReceivedChallenge, false)
|
||||
.listen(NetworkEvents.GameMatchResponse.class, this::handleMatchResponse, false);
|
||||
startPopulateScheduler();
|
||||
populateGameList();
|
||||
}, false, "startclient").listen(NetworkEvents.ConnectTry.class, e -> {
|
||||
// Platform.runLater(() -> loading.setAmount(e.amount()));
|
||||
}).postEvent();
|
||||
}
|
||||
|
||||
private void sendChallenge(String opponent) {
|
||||
|
||||
@@ -71,8 +71,8 @@ public abstract class BaseGameThread<TGame extends Game, TAI, TCanvas> {
|
||||
new Thread(this::localGameThread).start();
|
||||
else
|
||||
new EventFlow()
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse);
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse, false)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse, false);
|
||||
|
||||
setGameLabels(myTurn == 0);
|
||||
}
|
||||
|
||||
@@ -90,8 +90,8 @@ public class Connect4Game {
|
||||
setGameLabels(information.players[0].isHuman);
|
||||
} else {
|
||||
new EventFlow()
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse);
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse, false)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse, false);
|
||||
|
||||
setGameLabels(myTurn == 0);
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ public final class ReversiGame {
|
||||
setGameLabels(information.players[0].isHuman);
|
||||
} else {
|
||||
new EventFlow()
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse);
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse, false)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse, false);
|
||||
|
||||
setGameLabels(myTurn == 0);
|
||||
}
|
||||
|
||||
@@ -88,8 +88,8 @@ public final class TicTacToeGame {
|
||||
new Thread(this::localGameThread).start();
|
||||
} else {
|
||||
new EventFlow()
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse);
|
||||
.listen(NetworkEvents.GameMoveResponse.class, this::onMoveResponse, false)
|
||||
.listen(NetworkEvents.YourTurnResponse.class, this::onYourTurnResponse, false);
|
||||
|
||||
setGameLabels(myTurn == 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user