Giter VIP home page Giter VIP logo

amankori2307 / monopoly Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 12.99 MB

Monopoly is a multi-player economics-themed board game. In the game, players roll two dice to move around the game board, buying and trading properties, and developing them with houses and hotels. Players collect rent from their opponents, aiming to drive them to bankruptcy.

Home Page: https://monopoly.amankori.me/

License: MIT License

HTML 3.47% JavaScript 79.44% SCSS 17.09%
board-game game monopoly monopoly-board-game monopoly-game multiplayer-game

monopoly's People

Contributors

amankori2307 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dineshvishnu15

monopoly's Issues

Show Player Data

Create some sort of UI to show players on the page

  • show their money
  • their name
  • their bought sites

Implement Chest

When a player comes on Chest an action should happen based on the basis of diceSum

  1. diceSum can't be 1
  2. Loss in share market of $200
  3. Go to Jail
  4. Fine of $100 for the accident due to driving under liquor influence of
  5. School and medical fees, $100
  6. House repairs of $150
  7. Marriage celebration $200
  8. Loss of $300 due to fire in godown
  9. Make general repairs on all your properties
    • For each house pay $20
    • For each hotel pay $20
  10. Go to jail
  11. Pay insurance premium of $150
  12. Go to resort

Implement Redeem

The Player can redeem their mortgaged site by paying

Mortgage Value = 50% of Selling Price
Redeem at = 55% of Selling Price

Implement my cards component

MyCards: If we click on it it will Open A Modal which will be horizontally Scrollable

  1. There will be Multiple tabs
  2. All - Which will show all the sites user has bought
  3. Red - Red Color sites that user has, Similarly Green, Blue, Yellow, Pink, Brown, Orange, Sky Blue, Utility, Realm Railways

Implement Mortagage

The player can mortgage their sites and take money from the bank in return

Deduct rent

Deduct rent when a player comes to someone else's site

  • CASE 1 (type == site):
    • Normal site deduct rent which is mentioned on the site
    • Check if the user has all the cards of that color then the rent will be double
    • Check if the user has built on the site and deduct rent according to that
  • CASE 2 (type == realm_rails):
    • based on no of realm_rails user/player have, deduct rent
  • CASE 3 (type == utility):
    • base on no of utility user/player have, deduct rent

Add meta tags

Add meta tags, such as keywords, logo, description so that when I share Monoply link it looks good and for better SEO also

Handle Jail Case

Implement Logic and required UI changes to accommodate case where player is in jail

Implement logic to see if user is only visiting jail or he is in the jail

or

You can make it simple by just considering it a jail, which means if a user comes in jail he has to pay a 100$, no other option will be given and the amount will be automatically deducted and on the next turn if a user is in debt user will be shown pop with the options declare bankruptcy or repay debt, repay debt option will only be enabled if the user has assets of more worth than the dept otherwise user will have to declare bankruptcy

Implement Time Limit

add some sort of time, if the time is over an appropriate action will be taken, such set active user, if the user had no other option than bankruptcy than declare bankruptcy.

Handle Case Where User Has To Go Through More Than One Corner

  • When a user comes on to go to jail user has to go back to jail
  • When a user comes on chance in which user has to move back to someplace

In short, I just need to calculate how many corners the user is crossing and use logic that I am currently using to handle a single corner and modify it to handle multiple corners.

E.g. When a user comes from row 1 to row to the user has to through jail.
When a user comes to row 4 from row 1 user has to go through jail, resort, and go to jail to reach there(For cases like this I have to modify existing logic)

Stop Player Movement On Morgage/Redeem

If a player has just crossed jail/go/parking/go to jail and mortgage one his land then there an unnecessary movement happens, Player goes back to crossing point jail/go/parking/go to jail and from there he comes back to the current position

To fix this we can use a flag called isMoved and while moving players you can check if the player has already moved that way we can prevent unnecessary movement of player

Create Buy Site Modal

Create buy site modal

create buy site modal and show modal when user comes on a site

Implement actions after dice roll

  • If after dice roll user get on a site buy sIte, auction site, or Pay Rent
  • If after the dice roll user get on tax pay tex
  • if after the dice roll user get on chance or chest do things which comes up in chance or chest
  • etc.

Implement Sell

The player can sell his builds(houses & hotels that build)
on selling, player will get 50% of construction charges

Enhance SEO

Things to do

  • https://monopoly.amankori.me and https://www.monopoly.amankori.me should resolve to the same URL, but currently do not.
  • Your website is not connected with social media using the API's provided by Facebook, Google +, Twitter, Pinterest, or using addthis.com
  • Your website is not using a custom 404 error page. Default 404 error pages result in a poor experience - it can mislead users into thinking an entire site is down or broken, greatly increases the chance they leave your site entirely, and looks unprofessional. By creating a custom 404 error page, you can improve your website's user experience by letting users know that only a specific page is missing/broken (and not your entire site), providing them helpful links, the opportunity to report bugs, and potentially track the source of broken links in your site.
  • It does not appear that you are caching your pages. Cached pages serve up static html and avoid potentially time consuming queries to your database. It also helps lower server load by up to 80%. Caching most visibly benefits high traffic pages that access a database, but whose content does not change on every page view. Common caching methods include Alternative PHP Cache, Quickcache, and WP Super Cache (for Wordpress sites). Caching mechanisms also typically compress HTML, further reducing page size and load time.
  • Your server signature is on. Turning off your server signature is generally a good idea from a security standpoint. Read more on how to turn off server signature and improve your website's security.
  • Your website is not using cache headers for your JavaScript resources. Setting cache headers can help speed up the serving of your webpages for users that regularly visit your site.
  • Your website is not using cache headers for your images. Setting cache headers can help speed up the serving of your webpages for users that regularly visit your site and see the same images. Learn more about how to add expires headers to your images.
  • A Google Analytics script is not detected on this page. While there are several tools available to monitor your site's visitors and traffic sources, Google Analytics is a free, commonly recommended program to help diagnose potential SEO issues.
  • Your website is not using cache headers for your CSS resources. Setting cache headers can help speed up the serving of your webpages for users that regularly visit your site.
  • Your webpage doesn't take the advantages of HTML Microdata specifications in order to markup structured data. View Google's guide for getting started with microdata.
  • Your DNS server is not using an SPF record. SPF (Sender Policy Framework) allows administrators to specify which hosts are allowed to send mail from a given domain by creating a specific SPF record or TXT record in the Domain Name System (DNS). You can find more information about SPF records here.
  • add h1 heading to page
  • use good hedings on page
  • This page has only very few internal links. If it's a welcome page, consider removing it
  • Fix errors regarding language
  • Improve the text of meta description

Implement Bankruptcy/Repay Debt Modal

Based on the calculations repay debt option will be enabled/disabled

if the user doesn't have assets which is worth more than or equal to dept, then the repay debt option will be disabled, and the user will have no other choice than to declare bankruptcy

Implement Build

The Player can construct houses & hotel if it is allowed on that site
the construction/build charges are mentioned in the card details

Create a home page

Create a home page with following components

  • Header
  • Footer (my name in bottom and copyright)
  • About Section with button which will redirect to game and game screenshots as carousal

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.