import com.codingame.gameengine.core.AbstractPlayer.TimeoutException;
import com.codingame.gameengine.core.AbstractReferee;
import com.codingame.gameengine.core.AbstractPlayer.TimeoutException;
import com.codingame.gameengine.core.AbstractReferee;
import com.codingame.game.GodModeManager;
import com.google.inject.Inject;
import com.google.inject.Provider;
public class Referee extends AbstractReferee {
import com.codingame.game.GodModeManager;
import com.google.inject.Inject;
import com.google.inject.Provider;
public class Referee extends AbstractReferee {
gameManager.getPlayer(0).model = model.p0;
gameManager.getPlayer(1).model = model.p1;
for (Player p: gameManager.getPlayers()) {
p.gameInit(model.roadLength, model.initialStones,
gameManager.getPlayer(0).model = model.p0;
gameManager.getPlayer(1).model = model.p1;
for (Player p: gameManager.getPlayers()) {
p.gameInit(model.roadLength, model.initialStones,
}
private void disqualify(Player player, String popup, String message) {
player.deactivate(player.getNicknameToken() + " " + popup);
}
private void disqualify(Player player, String popup, String message) {
player.deactivate(player.getNicknameToken() + " " + popup);
*
* As a special case, the "cheater" (sending out negative
* stones) handling is deferred here because we need to update
*
* As a special case, the "cheater" (sending out negative
* stones) handling is deferred here because we need to update
- /* If a player cheated, delta is unusable as is.
+ /* Update game model and view, troll part.
+ *
+ * If a player cheated, delta is unusable as is.
* (Consider the case the player on the right sent
* INT_MIN. INT_MIN * (-1) = INT_MIN, so that player
* would both glean the stones *and* push the troll away.
* (Consider the case the player on the right sent
* INT_MIN. INT_MIN * (-1) = INT_MIN, so that player
* would both glean the stones *and* push the troll away.