Esempio n. 1
0
        public GameBuilder add_to_deck(DeckRow card)
        {
            card.blackjacktable_id = _blackjacktablerow.id;
            _blackjacktablerow.deck_rows.Add(card);

            return this;
        }
        public DeckRow create_deck_row_from(TableRow row, int card_position)
        {
            DeckRow deckRow = new DeckRow();

            var suit  = EnumParser.parse_enum <Suit>(row["Suit"]);
            var value = EnumParser.parse_enum <CardValue>(row["Value"]);

            deckRow.suit             = (int)suit;
            deckRow.card_value       = (int)value;
            deckRow.position_in_pack = card_position;

            return(deckRow);
        }
        public DeckRow create_deck_row_from(TableRow row, int card_position)
        {
            DeckRow deckRow = new DeckRow();

            var suit = EnumParser.parse_enum<Suit>(row["Suit"]);
            var value = EnumParser.parse_enum<CardValue>(row["Value"]);

            deckRow.suit = (int)suit;
            deckRow.card_value = (int)value;
            deckRow.position_in_pack = card_position;
            
            return deckRow;
        }