Git Product home page Git Product logo

monopoly-js's Introduction

Monopoly-js [Halted]

Halted because tests were becoming flaky and I had other projects. I'm still listening though, feel free to contribute.

Scroll down for demo

Implementation of the Monopoly game in javascript, rendering done with D3

Not quite yet a complete Monopoly game, right now players alternate, roll the dice, buy and trade properties and pay rents (and eventually go bankrupt). The main game flow is operational, from the beginning to the end.

Features missing to be a complete game of Monopoly :

  • Building houses and hotels, mortgage
  • When rent is too high, offer to unmortgage and/or unbuild instead of going straight to bankruptcy
  • Double rolls roll again, and 3 in a row bring you to jail
  • Players are forced out of jail after 3 turns
  • Differentiating between bankruptcy because of the bank or because of an opponent (to transfer possessions)
  • Chance and community cards
  • Bidding

Those nice features I'd like to play with after the basics are complete :

  • Ability to use different Monopoly boards (for ex. : french classic, zelda and star wars)
  • Migrate the game processing on a server, probably Node, and find free Node hosting like Heroku, in order to :
  • Save the game
  • Experiment with WebSockets with Node to add networking
  • Collect lots of game stats, like rentability, frequency, etc. in order to :
  • Experiment with different types of AI players - basic minimax, machine learning based on statistics, etc.

Demo

Click here and enjoy ! UI is available in english and french, depending on your browser language. Other languages will default to english. Monopoly board is the one we have in US/Canada.

Screenshots (with the french UI)

Game configuration screenshot

In-game screenshot

Development setup

To setup the project after downloading the sources, install node.js, then run 'npm install' both in the project directory and in the client/ subdirectory. After, the 'grunt' command should be available to build from that directory.

Run 'grunt background'. While it runs, open another terminal and run 'grunt check' to run tests and deploy. Also, the server is running in the background, so it is accessible on http://localhost:3000. It is also possible to connect directly to the Karma server on http://localhost:9876

Note: grunt runs karma on windows using git bash, so it must be in the path. Logically, at this point Git Bash should be installed, since you just pulled the sources from GitHub. But be sure to put Git Bash in the path (installation option in 'Git for Windows' installer)

This setup is not tested on non-Windows systems and therefore I don't know if this works.

Game Design Outline

Application states

Simple graph

... and for when the application is in the "Playing game" state :

Game flowchart

As you can see, it still misses a couple of features to make it a standard game of monopoly. They will be implemented later.

monopoly-js's People

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.