-
Notifications
You must be signed in to change notification settings - Fork 151
Developer Quick Start
Jerome Leclanche edited this page Nov 18, 2015
·
24 revisions
Fireplace is mainly a Python project, so setting up a development environment should be straightforward if you are familiar with normal Python tools, but there are a couple of wrinkles to be aware of.
Alternatively, you can use a Docker image that comes with everything pre-installed or create your own.
- Install Python 3.4 or above, as well as pip, and git. It's also generally useful to set up (and activate) a venv at this time.
- Clone the repository locally, e.g.
git clone https://github.com/jleclanche/fireplace.git
- Install requirements: from the root of the repository
pip install -r requirements.txt
- Run
bootstrap
(on Windows, requires Powershell). This downloads and initializes card definitions. - Check that everything works: from
tests
directory, runpy.test
(alternatively usepython -m pytest
). A successful run looks like:
============================= test session starts =============================
platform win32 -- Python 3.5.0, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: C:\Users\liuji\Google Drive\GitHubVisualStudio\fireplace, inifile:
collected 371 items
test_exceptions.py ....................
test_hero_powers.py ......
test_interactions.py .
test_main.py .........................................................................
......................................................................................
......................................................................................
test_mechanics.py ...........................
test_selector.py ..
========================= 371 passed in 18.09 seconds =========================
The python-hearthstone
dependency is unversioned, so if you run into issues, try upgrading it with pip install --upgrade --force-reinstall -r requirements.txt
pip install -e git+https://github.com/jleclanche/fireplace.git#egg=fireplace
pip install -r src/fireplace/requirements.txt
src/fireplace/bootstrap.sh
- The Fireplace Card API
- The Fireplace DSL
- Card introspection
- Creating and playing a Game
- The CardDefs.xml file
- Developer Quick Start
- How to enable logging in Hearthstone
- Frequently Asked Questions
- Game State
- Game Actions
- Powers and Card Actions
- Target Selection
- Events
- Enchantments