Soleone-cards

Create different types of cards in any setting (fantasy, real, science-fiction) that can fight with each other.


Install
gem install Soleone-cards -v 0.0.3

Documentation

Cards (temporary name)

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

Installation

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!

Development

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.

TODO

TODO

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