Skip to content

kaijchang/Dalaran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dalaran

Build Status

Lightweight library for parsing Hearthstone cards using Pyleri.

This library aims to provide a tool that can "read" Hearthstone cards and generate playable versions of them from their text.

In it's current state, the grammar parser still has a limited vocabulary. It can parse minions's abilities and basic spell actions and targeting a into a form usable in fireplace, a Python implementation of Hearthstone.

Installation

Clone this repository:

git clone https://github.com/kajchang/Dalaran.git
Cloning into 'Dalaran'...
cd Dalaran

Install fireplace:

pip3 install -e git+https://github.com/kajchang/fireplace.git#egg=fireplace

Install Dalaran and other requirements:

pip3 install .

Tests

There's a reasonable amount of test coverage, but more is coming in the future.

Run the tests:

python3 -m unittest discover

And that's how you can make and play with your custom hearthstone cards!

Resources Used

Building A Simple Interpreter In Python for basic knowledge of lexing and code examples.

Fireplace Documentation, Utilities, and Card Making API for examples of how to make integrate custom cards into their simulation and play and test games in their simulation.

Related Projects

Demystify, up-to-date-ish project for the same thing in Magic: the Gathering, which uses a blend of Python and ANTLR, but with a similar approach. However, I don't think there's a real simulation / play aspect, and that it's more of just lexing / parsing.

Contributing

Feel free to help out and contribute!

About

Basic Lexer and Parser for Hearthstone Cards

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages