コード例 #1
0
    public Game(Informer informer, bool doesLocalGoFirst, UIHooks uiHooks)
    {
        this.uiHooks   = uiHooks;
        this.informer  = informer;
        localPlayerNum = doesLocalGoFirst ? 0 : 1;
        oppPlayerNum   = doesLocalGoFirst ? 1 : 0;
        this.board     = new BoardState(
            informer.GetLocalHero(),
            informer.GetOppHero(),
            informer.GetLocalDeckSize(),
            informer.GetOppDeckSize(),
            doesLocalGoFirst ? GameRules.FIRST_PLAYER_RAMP : GameRules.SECOND_PLAYER_RAMP,
            doesLocalGoFirst ? GameRules.SECOND_PLAYER_RAMP : GameRules.FIRST_PLAYER_RAMP,
            doesLocalGoFirst);

        for (int i = 0; i < GameRules.FIRST_PLAYER_STARTING_DRAW; ++i)
        {
            Draw(0);
        }
        for (int i = 0; i < GameRules.SECOND_PLAYER_STARTING_DRAW; ++i)
        {
            Draw(1);
        }
        StartTurn();
    }