Giter VIP home page Giter VIP logo

mpms's Introduction

MPMS (MultiPlayer MineSweeper)

Multiplayer Minesweeper is a self-made project where you would have multiple people playing the same game of minesweeper while taking turns (that's the goal, anyway).

The different folders represent the different modules in the project. There's the logic folder which contains the logic used for playing the game. There's the ui folder containing all the ui code in an MVC pattern. Lastly you have the ai folder which contains the code used for the artificial intelligence.

The field is randomly generated and uses polymorphism to store all Mines and Numbers as Tiles.

The user interface is custom made in swing while being designed using the MVC pattern. The grid is dynamic and supports any Nโœ•N grid size. Here's what it looks like now:

UI

The AI is also custom made and can win most games if it doesn't hit a mine in the first few clicks. It uses the same Model from the MVC pattern on the UI so it only sees what you would see as a user. Here's the logic behind it:

  1. Find the probability that each unflipped tile is a mine using the flipped tiles.
  2. Select the move whose probability of being a mine is low OR flag a mine who's probability of being a mine is really high

Lastly, Here's a list of things I'm still planning on implementing:

  • A turn based system for playing with the AI/Another Player
  • Ability for the AI to realize when a bad flag is present (it never places bad flags unless it's guessing and guesses wrong)
  • Concurrency-safe code in the logic folder
  • A help button for asking for the ai to make a suggestion
  • An updated Console UI using the View interface
  • Client/Server code to play with someone else

And here's what I have completed:

  • A Fully fledged Minesweeeper game using a console UI
  • The same game with a Swing UI
  • An AI player

mpms's People

Watchers

James Cloos avatar Wesley Vansteenburg avatar

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.