This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

FlyingRabidUnicornPig
FlyingRabidUnicornPig presents ...

2013/6/30

Minesweeper

Minesweeper in greenfoot!
I was going to enter this into the intermediate June contest, but I've ran out of time, and I couldn't figure out how to correctly implement changing the worlds size for new levels without causing errors, scrollbars, etc. Enjoy the most of the game I got done anyways!
If you want to play your own custom levels, download the scenario, then right click the Minesweep world class, then click "new Minesweep(int size, int mines)" which creates a square world, or "new Minesweep(int width, int height, int mines)" which creates a rectangle world. The default constructor creates the world you see on the site.

Controls:
Left click: Reveal underneath the tile
Right click: Place a flag or a question mark to mark areas you think may have a bomb (if it has a flag you won't be able to reveal it until you remove the flag)
Press "R" to restart the world if you lost or won.

Objective:
Reveal every tile but the ones with mines, if you hit a mine, you will explode! The numbers that are revealed underneath tiles tell you how many mines are around it, to the sides, and diagonally.

6571 views / 18 in the last 7 days

1 vote | 0 in the last 7 days

Tags: mouse game with-source

This scenario is a member of: Reusable Code from FRUP


open in greenfoot
Your browser does not support the canvas tag.
shrucis1shrucis1

2013/11/20

Is there any way for it to detect that you won or lost? I think I won twice but received no acknowledgement. D:
Well, like normal minesweeper, it will turn all the flags/empty spaces that contained mines and show you the mines, does the same thing if you hit one bomb. Much more noticeable in the offline version, where you can change the amount of bombs, the size, etc.

Want to leave a comment? You must first log in.

Who likes this?

dibo