Skip to content

jacadzaca/monopoly

Repository files navigation

About

This repository contains code for a simple [Monopoly](https://en.wikipedia.org/wiki/Monopoly_(game\)) server. The server's written in Kotlin using the vert.x framework.

What's missing?

  • a sane looking frontend
  • a (Go to jail)/Jail tile
  • the free parking tile
  • the chance/Community Chest cards and tiles
  • train stations
  • multiple rooms support (not as an big of an issues as it sounds)
  • some win condition; the game will go on as long as their is someone who is not bankrupt

Building

git clone https://github.com/jacadzaca/monopoly.git && cd monopoly && ./gradlew shadowJar

Running

java -jar build/libs/monopoly-1.0.0-SNAPSHOT.jar run com.jacadzaca.monopoly.HttpServer --launcher-class=io.vertx.core.Launcher -Dstarting_balance=2000

The 'Protocol'

See GameStateController.js for an example implementation and Delta.kt for the 'protocol definition'

The program's flow

First there is a request that's intercepted by the Web socket server, validate by one of the validators and then either converted into an error message or an command. The command is then executed and a change is propagated.

Disclaimer

This project is in no way affiliated with, authorized, maintained or endorsed by Hasbro or any of its affiliates or subsidiaries. This is an independent and unofficial project. Use at your own risk.

The code is licensed under an GPL license. Refer to the LICENSE file for more information.