feat(deck-hexv1): implement experimental HexV1 card deck

This commit is contained in:
2025-03-28 00:05:10 +01:00
parent 4104b01978
commit 2cfcd0089f
4 changed files with 217 additions and 1 deletions

View File

@ -13,6 +13,10 @@ func DeckFromInterface(cardDeckId int, cardDeck bson.D) types.CardDeck {
deck := Classic{}
bson.Unmarshal(bsonBytes, &deck)
return &deck
case 1:
deck := HexV1{}
bson.Unmarshal(bsonBytes, &deck)
return &deck
}
return nil
@ -26,6 +30,10 @@ func CardFromInterface(cardDeckId int, card bson.D) types.Card {
deck := ClassicCard{}
bson.Unmarshal(bsonBytes, &deck)
return &deck
case 1:
deck := HexV1Card{}
bson.Unmarshal(bsonBytes, &deck)
return &deck
}
return nil
}