Example #1
0
        public static TradeCardsCommand Create(TradeEscrow escrow)
        {
            TradeCardsCommand command = new TradeCardsCommand();

            command.escrow = escrow;
            return(command);
        }
Example #2
0
        public static AddTradeRequestCommand Create(TradeEscrow escrow, TradeRequest request)
        {
            AddTradeRequestCommand command = new AddTradeRequestCommand();

            command.escrow  = escrow;
            command.request = request;

            return(command);
        }
Example #3
0
    public static TradeEscrow Create(TeamCollection teamCollection, PlayerGroup playerGroup)
    {
        TradeEscrow command = new TradeEscrow();

        command._playerGroup         = playerGroup;
        command._teamCollection      = teamCollection;
        command.transactionCompleted = false;

        return(command);
    }
Example #4
0
    public static TuckMatchState Create(
        List <PlayerState> playerList,
        CardDeck cardDeck)
    {
        TuckMatchState state = new TuckMatchState();

        state.cardDeck      = cardDeck;
        state.playerGroup   = PlayerGroup.Create(playerList, cardDeck);
        state.board         = Board.Create(playerList);
        state.teams         = TeamCollection.Create(playerList);
        state.escrow        = TradeEscrow.Create(state.teams, state.playerGroup);
        state.validator     = MoveValidator.Create(state.board);
        state.gameMatchMode = GameMatchMode.INITIAL;

        return(state);
    }