Git Product home page Git Product logo

minesweeper's Introduction

Minesweeper

Replica of the classic Microsoft original game written in Java

MIT License Version 1.0.0 Stability Stable Travis CI

About

Minesweeper is game originally developed my Microsoft. The objective of the game is to find the empty squares while avoiding the mines. The faster you clear the board, the better your score. The rules in Minesweeper are simple: Uncover a mine and the game ends, uncover an empty square and you keep playing, uncover a number and it tells you how many mines lay hidden in the eight surrounding squares - information you use to deduce which nearby squares are safe to click. Right click to flag a potential mine or set a question mark. Press the smiley to reset.

Authors

This project was created by Rafael Grigorian and Marek Rybakiewicz. It was originally assigned for Project #02 for the class CS342 (Software Design) at the University of Illinois at Chicago.

Building & Executing

Maven is used as the build system for this project. In order to build the source files, package them into a jar file, and preform unit testing, run mvn package. In order to skip unit testing, simply run mvn package -DskipTests. In order to launch Minesweeper, run java -cp target/minesweeper-1.0.0.jar com.minesweeper.MineSweeper.

minesweeper's People

Contributors

mrybak834 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hellopoogle

minesweeper's Issues

Check for mine in starting click

The mine array needs to be initialized after the starting click occurs, in order to make sure that the user does not click on a bomb right away.

labe.getLocation() = (x,y), check the scaling factors and divide accordingly to get proper coordinates. Pass these coordinates to InitializeGridMines, checking for each new coordinate if it is not equal to the passed coordinate.

Slight bug in game / timer logic

If I start a new game, and the first thing I do is mark a coordinate with a flag, and then open another one coordinate, the counter isn't triggered and the timer doesn't begin to tick.

Notes so far

For the timer
int gameStart = 0 when game is not in progress, 1 when game is in progress

For bomb counter
int bombsLeft = (Total Bombs - number of flags on the field)

TBA
Score counting - have to read up on what I need to report because I think there are deductions if the user detonated the bomb, mis-flagged a bomb, didn’t flag a bomb, etc.

If anything I’ll tally up the score in an
int userScore

Notes on Board
Must be un-resizable, way too much work with images

I made a button 26x26, and the board size 280x380. If you modify the board size, try to keep it in multiples of 10, and let me know, or modify the board how you want and i'll modify buttons to fit.

Grid must be : Jpanel x = new Grid();

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.