Coder Social home page Coder Social logo

monopoly's Introduction

Monopoly

This is a working project, designed to simulate a game of monopoly.

Functions

  • roll_dice Randomly rolls 2 dice, and saves the result and whether a double was rolled.
  • setup_game Takes user inputs and creates a dictionary with an entry for each player. Information includes player names, pieces, starting money, starting position and list of owned properties. Also calculates who goes first, depending on who rolls the highest.
  • have_turn Main function that moves the player's piece around the board and allows user to make decisions. Currently only allows player to buy a property.
  • play_game Implements have_turn function in 2 loops (for players and turns) in order to allow the game to progress. Currently allows double rolls to have another go.

To do list

  • 3 rolls --> go to jail
  • Being in Jail
  • Pay rent to other players
  • Trading
  • Purchase houses/hotels
  • Collect money when passing Go
  • Paying tax
  • Chance/community chest
  • Mortgaging
  • Graphics

monopoly's People

Contributors

a-m-jones avatar

Watchers

 avatar

Forkers

nex-pro

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.