-
Notifications
You must be signed in to change notification settings - Fork 0
Home
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!
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.
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
These things need to be done:
Summon CreaturesCreatures can fight each otherCreatures stay until killed- Rewrite MetaClass implementation (use class instance variable
attributes instead of @
attributes for easy value inheritance) - Enchant creatures with temporary or permanent “spells”
- “Cast spells” that do something only once (like 2 damage to player)
- Try to be theme-agnostic could be either fantasy, science fiction or even reality-like