Skip to content

tonywok/realms

Repository files navigation

Realms

Star Realms is a spaceship combat deckbuilding game. To learn to play, read the rules over at White Wizard Games

I've created this to learn about and practice implementing strategic digital card games. If you're reading this and are also interested, shoot me an email.

Table of Contents

Installation

Add this line to your application's Gemfile:

gem 'realms'

And then execute:

$ bundle

Or install it yourself as:

$ gem install realms

Usage

I present to you, kind reader, the world's most uninteresting StarRealms game -- death by Viper.

game = Realms::Game.new
game.start

until game.over?
  hand = game.active_player.hand

  until hand.empty?
    game.play(hand.first)
  end

  game.attack(game.passive_player) if game.active_turn.combat.positive?
  game.end_turn
end

If you'd like to learn more about the underlying concepts and how to script the game, head over to the wiki

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tonywok/realms. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Copyright

This is an implementation of the game Star Realms, which was created by White Wizard Games. While the code conforms to the MIT license, any intellectual property, of which I've made an effort to include none of, falls under their copyright.

About

An implementation of the Star Realms deckbuilding game.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published