public static UpdatableGameState createInitialGameState(GameStartApiResponse startData, GameUpdateApiResponse firstUpdateData) {
        return new UpdatableGameState(
                firstUpdateData.getTurn(), startData, MapPatcher.patch(firstUpdateData.getMapDiff(), new int[]{}),
                MapPatcher.patch(firstUpdateData.getCitiesDiff(), new int[]{}),
                firstUpdateData.getGenerals(),
                createPlayersInfo(startData, firstUpdateData),
                firstUpdateData.getAttackIndex());
    }
public static UpdatableGameState createInitialGameState ( GameStartApiResponse startData , GameUpdateApiResponse firstUpdateData ) { return new UpdatableGameState ( firstUpdateData . getTurn ( ) , startData , MapPatcher . patch ( firstUpdateData . getMapDiff ( ) , new int [ ] { } ) , MapPatcher . patch ( firstUpdateData . getCitiesDiff ( ) , new int [ ] { } ) , firstUpdateData . getGenerals ( ) , createPlayersInfo ( startData , firstUpdateData ) , firstUpdateData . getAttackIndex ( ) ) ; }
Creates the first game state just after the game is started. Can be done only after both messages are received from server:
{@link GameStartApiResponse} and {@link GameUpdateApiResponse}. Cannot be use for further updates, as later game updates
from server contain only differences.