Git Product home page Git Product logo

worldconquer's Introduction

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.

worldconquer's People

Contributors

alfredocadiz-oviva avatar badgercl avatar

Stargazers

 avatar

Watchers

 avatar

worldconquer's Issues

Implement game stats

  • Most invaded territory
  • Switzerland: The last invaded country which also never invaded anyone else
  • Longest living empire: The one on Top1 for the longest period
  • First eliminated country

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.