Skip to content

badgercl/WorldConquer

Repository files navigation

World Conquer Game

Swift implementation based on World War Bot's rules.

Features

Current

  • Can use any World configuration as a JSON file.
  • Customizable rules: different winner and conquered territory implementation can be supported.
  • Customizable output: the game status can be updated in different supports, e.g. Twitter, Telegram, console log, filesystem. (Currently only console output is provided).
  • Dot-notation world states
  • Internationalisation
  • Telegram plugin

Future work

  • Twitter plugin
  • Interactions with the bot

Requirements

  • Swift 5.3+ installed in your macOS or Linux machine.

Installing swift

  1. For macOS users, it comes included with Xcode, you can download from the App Store:
  2. For linux users, follow the instructions in https://swift.org/download/#using-downloads.
  3. For windows users: there are some solutions, but don't have a machine to try them out 🤷🏽‍♂️

Developer environment

  1. macOS: use Xcode 🚀
  2. Linux: you can also have nice dev environments, please check

Running tests

  • macOS and Linux: from the root level run swift test
  • macOS + Xcode: cmd+U

Running the game

You can get the latest available commands by runing swift run WorldConquerApp -h

For instance, to bootstrap a game using the provided Earth map and see the output in the console you can run the following command from the root level

swift run WorldConquerApp --json worlds/earth.json --console

and then every step is processed by calling

swift run WorldConquerApp --console

When a country has conquered the whole world, the game will output the winner and no more steps will be processd.

Releases

No releases published

Packages

No packages published