A multiplayer card game framework for stuff like Magic: The Gathering
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Cards (temporary name)

Cards wants to be a framework for building card games like Magic: The Gathering.


Simple usage

If you just want to use the library, you can install the gem-version with: gem install Soleone-cards --source http://gems.github.com

Just remember that the library is at a very early stage at this moment!


If you want to work on the code, you need to clone this repository first with: git clone git://github.com/Soleone/cards.git

To run the tests you need the following gems installed:

  • rspec: gem install rspec
  • rcov: gem install rcov

After that you should be able to run the specs in the root folder with rake.

Try rake -T to see a list of all available tasks.

User Guide

A Card can have a name, type, description, a subclass is Creature (something to “put on the table”).
You can inherit from the Creature model to create monsters and people, etc.

Creatures include the Fighting module, which gives them power, defense and health
They can attack another creature and deal damage according to their power.
If a creature has 3 power and the other one 1 defense, then the other creature will loose 2 health.



These things need to be done:

  1. Summon Creatures
  2. Creatures can fight each other
  3. Creatures stay until killed
  4. Rewrite MetaClass implementation (use class instance variable attributes instead of @attributes for easy value inheritance)
  5. Enchant creatures with temporary or permanent “spells”
  6. “Cast spells” that do something only once (like 2 damage to player)
  7. Try to be theme-agnostic could be either fantasy, science fiction or even reality-like