Minesweeper - Customizable classic game: rows, columns, mines, icons...

Minesweeper
The classic Minesweeper game where you must discover all the empty cells without detonating the hidden mines.


  • Reveal all the cells that do not contain mines.

  • Mark the cells that do contain mines with flags.

  • The numbers tell you how many mines are in the 8 surrounding squares.

  • If you reveal a mine... you lose the game!

  • If you reveal all the safe squares, you win!


  • You can customize the cell and number colors, change the icons, set how many mines there are, and how many rows and columns there are.

  • If the number of rows and columns is not specified, they will be automatically set to the size of the Arrangement.


  • If the functions to set the icons are not used, the default icons will be used.

    • Mines: :bomb:
    • Flags: :triangular_flag_on_post:
    • Exploded Mine: :boom:
  • The same applies to the colors of the numbers and cells; if the function to change the colors is not used, the default colors will be used.


InitializeGame

Start the Minesweeper game in an HVArrangement.


ResetGame

Restart the game with the current settings.

component_method (13)


RevealCell

Reveals a cell at the specified position.

blocks (53)


ToggleFlag

Mark/unmark a cell with a flag.

blocks (67)


RevealAllCells

Reveal all cells.

component_method (11)


GetCellValue

Gets the value from a specific cell.


IsCellRevealed

Check if a cell is revealed.


IsCellFlagged

Check if a cell is flagged.


MineIcon

Set the mine icon from a file in assets.


FlagIcon

Set the flag icon from a file in assets.


ExplodedMineIcon

Set the exploded mine icon from a file in assets.


CorrectlyFlaggedIcon

Set the correct flag icon from a file in assets.


SetNumberColor

Change the color of a specific number (1-8).


GetNumberColor

It gets the color from a specific number (1-8).


HiddenCellLightColor

Change the color of hidden cells (light pattern).


HiddenCellDarkColor

Change the color of hidden cells (dark pattern).


RevealedCellLightColor

Change the color of the revealed cells (light pattern).


RevealedCellDarkColor

Change the color of the revealed cells (dark pattern).


FlaggedCellColor

Change the color of the flagged cells.


MineExplodedColor

Change the color of the exploited mines.


CorrectlyFlaggedColor

Change the color of correctly marked leads.


AllNumberColors

Configure all number colors at once.


AllCellColors

Configure all cell colors at once.


BoardState

Gets a string representing the state of the board.

component_method (12)


SetRows

Configure the number of rows.

blocks (47)


SetCols

Configure the number of columns.

blocks (46)


SetMines

Configure the number of mines.

blocks (66)


Rows

Gets the number of rows.

component_set_get (3)


Cols

Gets the number of columns.

component_set_get (4)


Mines

Get the number of mines.

component_set_get (6)


GameOver

Check if the game has ended.

component_set_get (5)


GameInitialized

It fires when the game has been initialized.


GameReset

It triggers when the game has been restarted.

component_event (12)


GameOver

It fires when the game ends.

component_event (14)


CellFlagged

It is triggered when a cell is marked/unmarked with a flag.

component_event (16)


CellRevealed

It is triggered when a cell is revealed.

component_event (15)


v1.0 Feb 21, 2026.

Minesweeper.aia (42.6 KB)

joejsanz.joedevminesweeper.aix (19.7 KB)


JDK: 11
Minimum API Level: 21
Updated On: 2026-02-21T08:00:00Z

Built using: FAST-CLI v5.3.2-premium


Thanks.

2 Likes