Hearthstone card game engine library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
Setup.hs
hearthshroud.cabal

README.md

About

Hearthshroud is one of two things:

  • A Hearthstone game engine library.
  • A simple Hearthstone executable with a console UI.

Library

Library uses a monadic API which drives the game engine for any HearthMonad:

-- MonadPrompt @ https://hackage.haskell.org/package/MonadPrompt
type HearthMonad m = MonadPrompt HearthPrompt m
Hearth.Engine.runHearth :: (HearthMonad m) => Pair PlayerData -> m GameResult
Design Choices
  • Model cards (and abilities, effects, etc.) as a pure data AST. This is the card DSL.
  • Model enforces game constraints at the type level.
Design Implications
  • Engine interprets the cards. (As opposed to the cards directly manipulating the environment.)
  • AI directly interprets the same cards as well.

Executable

Sample game client is Hearth.Client.Console and can be seen in action by:

Hearth.Client.Console.main :: IO ()

ui-game-1 ui-game-2 ui-show-card ui-game-help ui-program-help


Installation

Steps

  • Clone repository
  • Use cabal tool to build/install

For those unfamiliar with cabal, search Google for "haskell cabal how to use" (or whatever).

Contact Me

  • Probably the best way to ask me a question or tell me a comment is to just create an issue directly for the project (even if it is not a real issue).
  • I am sometimes on #hearthsim IRC.

Related Hearthstone Projects