Giter Club home page Giter Club logo

monopoly's Introduction

Project Selection: An Online Monopoly Game Platform

Team Members:

  • Boran Özüm - 2380814
  • Muhammed Enes İzgi - 2310142

Project Description

Phase 1

We have created several classes to make it easier to code this project.

  1. Board Class: This is our main class. It manages the game.
  2. Player Class: This class represents the players in the game.
  3. Cell Class: This class represents every cell in the board.
  4. Subclasses of Cell Class: These classes represent the different types of cells in the game.
    • ChanceCard Class: This class represents the chance card cell. Player draws a chance card when they come here.
    • GotoJail Class: This class represents the gotojail cell. Player goes to jail when they come here.
    • Jail Class: This class represents the jail cell. Player stays in this cell when they are in jail.
    • Lottery Class: This class represents the lottery cell. Player gets the lottery fee when they come here.
    • Property Class: This class represents the property cell. Player can buy/upgrade/downgrade this cell when they come here.
    • Start Class: This class represents the start cell. Players start here. They get the start fee every time they pass this cell.
    • Tax Class: This class represents the tax cell. Player pays the tax fee when they come here.
    • Teleport Class: This class represents the teleport cell. Player can teleport to another cell by paying teleport fee when they come here.

Phase 2

We have included three new files for this phase to implement TCP communication between users and board. These files are:

  1. client.py: This class represents the client. It connects to the server and sends/receives messages to/from the server.
  2. app.py: This class represents the server. It listens to the clients and sends/receives messages to/from the clients.
  3. TCPMessage.py: This class represents the messages that are sent between the server and the clients.

Phase 3

We have created a Django project for this phase. We have created a new app called "monopoly" and we have moved our code to this app. In addition to the default files for the Django project, we have created the following files:

  1. views.py: This file contains the functions that are called when a user sends a request to the server.
  2. signals.py: This file contains the functions that are called to handle extra work when a user logs in or logs out.
  3. db.sqlite3: This file contains the database of the project.
  4. templates: This folder contains the html files that are used to render the pages. These html files include:
    1. base.html: This file is the base html file. Other html files extend this file.
    2. home.html: This file is the home page of the project. It contains the list of available games.
    3. board.html: This file is the game page of the project. It contains the board and the form data.

Phase 4

We have transformed our socket server into a websocket and put all the operation into this websocket. We used django only for authentication and html rendering. To run the project, in the main directory, run the following commands:

Run the django server

python manage.py runserver

Run the websocket server

cd monopoly-server

python app.py

monopoly's People

Contributors

enesizgi avatar boranozum avatar

Watchers

 avatar

Forkers

boranozum

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.