{"id":16553579,"url":"https://github.com/forthoney/boardgame_engine","last_synced_at":"2026-05-31T22:31:53.341Z","repository":{"id":60822340,"uuid":"542855968","full_name":"Forthoney/boardgame_engine","owner":"Forthoney","description":"A gem that provides templates to quickly create boardgames in ruby","archived":false,"fork":false,"pushed_at":"2023-01-18T14:19:36.000Z","size":58,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T19:17:44.146Z","etag":null,"topics":["boardgame","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/boardgame_engine","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Forthoney.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-29T00:59:36.000Z","updated_at":"2022-10-06T17:26:18.000Z","dependencies_parsed_at":"2023-02-10T15:31:31.696Z","dependency_job_id":null,"html_url":"https://github.com/Forthoney/boardgame_engine","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forthoney%2Fboardgame_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forthoney%2Fboardgame_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forthoney%2Fboardgame_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Forthoney%2Fboardgame_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Forthoney","download_url":"https://codeload.github.com/Forthoney/boardgame_engine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241904317,"owners_count":20040014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boardgame","ruby"],"created_at":"2024-10-11T19:48:47.150Z","updated_at":"2026-05-31T22:31:53.300Z","avatar_url":"https://github.com/Forthoney.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BoardgameEngine\n\nA gem that provides a template for creating boardgames. It aims to streamline\nthe process of making boardgames to be played on the terminal by providing a \nvariety of classes and modules.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n    $ bundle add boardgame_engine\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n    $ gem install boardgame_engine\n\n## Usage\n### Initial Setup\nTo start making your own boardgame using this gem, your game module needs at least two classes -\na `Game` class inheriting from `Boardgame` and a `Board` class inheriting `Board`.\n`Game` captures the core gameplay loop/logic and the `Board` captures \ninteractions with the board.\n\nDepending on the game rules, select child modules from the `Games` and `Boards`\nand include it into the `Game` and `Board` class respectively.\nThese modules will handle much of the game and board logic related to the\ngame mechanic/rule.\n\nFor example, if the turns in your game go in a cycle like 1 -\u003e 2 -\u003e 3 -\u003e 1 -\u003e 2 ...\nyour `Game` class would look like\n```ruby\nclass Game \u003c BoardgameEngine::Game\n  include Games::CyclicalGame\n  NUM_PLAYERS = 3\n  ...\nend\n```\nIncluding this module makes it so that the `BoardgameEngine::Game#change_turn` \nmethod automatically hands the turn over to the correct player.\n\n### Overriding\nAt the current stage of the app, there are methods that necessarily must be\noverridden in the child class.\n`play_turn` must be implemented on _your_ `Game` class, and must contain what happens\nduring a single turn (not a round, just a turn).\n\nAdditionally, the limited number of modules mean that you will probably have to implement some\nmethods on your own. I hope to reduce the number of these as the app matures.\nI left yard comments on all module methods, so hopefully overriding won't be too\ndifficult.\n\n## Example Games\nCheck out `connect4.rb` for a game built with rather minimal overrides and\n`chess.rb` for a game that makes heavy use of customization.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports are welcome on GitHub at https://github.com/Forthoney/boardgame_engine.\nI may not get to them quickly but it will be greatly helpful\n\nAs the app is under heavy development I will not look deeply into actually \npulling pull requests (if there were to be any).\nI will definitely consider the ideas proposed in them, so they are still welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthoney%2Fboardgame_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforthoney%2Fboardgame_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforthoney%2Fboardgame_engine/lists"}