thomaseding / hearthshroud

Hearthstone card game engine library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Hearthstone card game engine library

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 100.0%