public static DuelInfo CreateDuel() { DuelInfo duelInfo = new DuelInfo(); duelInfo.friendlySide = new PlayerInfo() { id = "test_player_01", displayName = "test_player_01", deck = new DeckInfo() { id = "32e379e8-7762-4d67-a418-4c44ceccc16a" } }; duelInfo.opponent = new PlayerInfo() { id = "test_player_02", displayName = "test_player_02", deck = new DeckInfo() { id = "003b09be-4c35-4611-80c2-cc52332b99cd" } }; return(duelInfo); }
private void initDuel(DuelInfo duelInfo) { gameContext.id = "test_dule"; gameContext.turn = 0; gameContext.activePlayer = null; gameContext.phase = Phase.CHOOSE_HAND; gameContext.playerOneState = PlayerState.CreatePlayerState(duelInfo.friendlySide, true); gameContext.playerTwoState = PlayerState.CreatePlayerState(duelInfo.opponent, false); }
private void initGame() { DuelInfo duelInfo = DuelInfo.CreateDuel(); gameContext = new GameState(); initDuel(duelInfo); GameView gameView = new GameView(gameContext); gameView.CreateBoard(); renderMyHands(); }