https://github.com/kaijchang/deckstring
Unofficial Hearthstone-Like Deckstrings for NovaBlitz
https://github.com/kaijchang/deckstring
deck-building encoding novablitz
Last synced: 2 months ago
JSON representation
Unofficial Hearthstone-Like Deckstrings for NovaBlitz
- Host: GitHub
- URL: https://github.com/kaijchang/deckstring
- Owner: kaijchang
- License: mit
- Created: 2018-08-26T03:02:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T02:24:32.000Z (almost 8 years ago)
- Last Synced: 2024-08-09T03:26:53.737Z (almost 2 years ago)
- Topics: deck-building, encoding, novablitz
- Language: Python
- Homepage: https://kajchang.github.io/deckstring/
- Size: 31.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# NovaBlitz Deckstrings
An unofficial port of Hearthstone's deckstrings for NovaBlitz to make copying and sharing decks easy for players and community members.
## Encoding Scheme
Virtually identical to [Hearthstone's deckstrings](https://hearthsim.info/docs/deckstrings/), an deckstring consists of:
### Header Block
1. Version (1).
### Aspect Block
The first character denotes the number of aspects in the block, the following numbers are the aspects, encoding as 0-4, alphabetically. (eg. Arcane -> 1).
### Card Blocks
There are 3 card blocks:
1. For 1-copy cards.
2. For 2-copy cards.
3. For 3-copy cards.
Each is led by a character indicating the number of cards in the block, and then the cards, each represented by its card id.
Each integer is encoded as a [varint](https://developers.google.com/protocol-buffers/docs/encoding#varints), and then encoded using base-64.
## Implementation
Loose Python and Browser implementations are included in this repository.
``
A browser demo is located [here](https://kajchang.github.io/deckstring).