Minesweeper - ISC Edition is a new take on the classic game : Minesweeper. Minesweeper - ISC Edition is a single-player logic-based computer game played on a rectangular board. The goal is to locate a predetermined number of randomly-placed mines by clicking on safe squares while avoiding the squares with mines. The player must use their wits and deduction to find the squares with mines and signal them using flags. Minesweeper - ISC Edition takes it's visual inspiration from the ISC branch of the HEI of Sion (which is by far the best branch).
"Attention Helldivers! The enemies of Managed Democracy have planted mines inside of our territory. It is your duty to bring Freedom and Peace once more inside of our soil. For Super Earth!"
Hellsweeper is an alternative mode available for Minesweeper - ISC Edition. Bringing a brand new visual style, Hellsweeper puts you in the boots of an elite Helldiver tasked with the perilous mission of clearing minefields to secure humanity's survival in a hostile galaxy. Hellsweeper will take you on a democratic and perilous adventure as you locate and secure the mines hidden by Super Earth's enemies. But fear not! Your brave commander is here to bring you valuable moral support during your fight! Good luck, and may the light of Liberty guide you.
Once you have selected one of the three difficulty available, the game will generate a board with hidden squares. Your goal is to find and flag all the hidden mines without clicking on one. Left-click
on a square reveals either a number or a blank space. Numbers tell you how many mines are in the eight squares surrounding the one you just clicked. To mark a mine, Right-click
to place a flag. Use the numbers to figure out where the mines are and clear all the safe squares. If you clear every safe square and flag all the mines correctly, you win! Avoid guessing and use logic to solve the puzzle.
If you find yourself stuck or wishing to change the current setting, you can press R
on your keyboard to generate a new game! Pressing M
will return you to the menu, while pressing Escape
will close the game.
- Graphics Setup:
- Initializes the game window using
FunGraphics
, setting dimensions, titles, and display options
- Initializes the game window using
- Audio Initialization:
- Prepares sound effects like background music and action sounds using the
Audio
class
- Prepares sound effects like background music and action sounds using the
- Grid Setup:
- Constructs a grid of
Cell
objects representing each tile in the game
- Constructs a grid of
spawnMines()
:- Places mines randomly in the grid, ensuring unique positions
countMines()
:- Calculates and stores the number of adjacent mines for each cell
clearFirstClickArea(row, col)
:- Ensures the first clicked area is free of mines for a fair start
revealAdjacent(row, col)
:- Recursively reveals adjacent cells if no adjacent mines are present
drawGrid()
:- Renders the game grid, dynamically adjusting cell colors, images, and fonts based on the game state
win() / lost()
:- Displays a "WIN" or "LOST" screen with animations and updates
- Mouse Input:
- Handles left-click (reveal) and right-click (toggle flag) actions, triggering appropriate updates to the game state.
- Keyboard Input:
- Supports actions like restarting (
R
), opening the menu (M
), or exiting (ESC
).
- Supports actions like restarting (
startNewGame()
:- Resets the grid and initializes a new game with specified parameters
drawMenu()
(viamenu
object):- Manages rendering of the main menu and navigation logic
drawMenu()
- Displays the main menu with options for "Play," "Settings," and "Exit"
- Clears the graphics buffer
- Renders menu elements (background, buttons)
- Handles mouse clicks for:
- Play: Transitions to
drawLevelMenu()
- Settings: Transitions to
drawSettingsMenu()
- Exit: Exits the application
- Play: Transitions to
drawLevelMenu()
- Provides buttons for selecting difficulty levels: Easy, Medium, and Hard
- Clears the graphics buffer and draws the level selection UI
- Handles mouse clicks to:
- Adjust grid dimensions (
rows
,cols
), cell size, and mine count for each level - Start a new game by calling
startNewGame()
- Adjust grid dimensions (
drawSettingsMenu()
- Displays the settings menu, including an option to activate "Helldiver Mode"
- Clears the graphics buffer and draws the settings UI
- Handles mouse clicks for:
- Returning to the main menu (
drawMenu()
) - Activating "Helldiver Mode," which modifies game behavior and visuals
- Returning to the main menu (
- Mouse Input Handling
- Each menu listens for mouse clicks and determines button interactions based on click coordinates
- Graphics Rendering
- Uses
graphics.drawTransformedPicture()
andgraphics.drawString()
to render UI elements and text dynamically
- Uses
- Sound effects
- Plays
buttonSound
on button interactions andgameHellmode
for "Helldiver Mode"
- Plays
hellsweeperMode (Boolean)
- Tracks whether "Helldiver Mode" is active
false
: Default modetrue
: Helldiver mode
defaultPath (Array[String])
- Contains file paths for default game assets such as grid tiles, menu buttons, and backgrounds
hellsweeperPath (Array[String])
- Contains file paths for Helldiver Mode assets, including grid tiles and menu visuals tailored for the mode
activePath (Array[String])
- Dynamically references either defaultPath or hellsweeperPath based on the current game mode
* getImagesPath()
- Updates the
activePath
array based on the current mode: - Switches to
hellsweeperPath
ifhellsweeperMode
istrue
- Reverts to defaultPath if
hellsweeperMode
isfalse
lostImage
- File path for the image displayed when the player loses the game in Helldiver Mode
winImage
- File path for the image displayed when the player wins the game in Helldiver Mode
- General-Related Images:
generalImage
: Path for General Mudry's imagegeneralHelmetImage
: Path for General Mudry with a helmetgeneralTextImage
: Path for text assets related to General Mudry
voiceline (Array[String])
- An array of inspirational and thematic quotes delivered by the General himself
- Purpose:
- Displays a randomized voiceline from the voiceline array along with the General's visual and thematic elements.
- Clear Graphics:
- Clears the screen using
graphics.clear()
- Clears the screen using
- Background Setup:
- Draws the General's background and image
- Randomized Voiceline Selection:
- A random quote is selected from the
voiceline
array
- A random quote is selected from the
- Text Presentation:
- Draws the General's associated text image and displays the selected voiceline
- Delays for Effect:
- Pauses for 500ms before displaying the text.
- Keeps the voiceline and visuals on screen for 5 seconds