filmov
tv
Java OO Minesweeper - Part 2 - Understanding Minesweeper game logic
![preview_player](https://i.ytimg.com/vi/IphQgTXGsR8/maxresdefault.jpg)
Показать описание
Hey Guys, welcome to my 'OO Minesweeper', Part 2 - Understanding Minesweeper game logic
So, before we jump into coding, let's check first the Minesweeper game logic.
Minesweeper is a single-player board game. The grid consists of hidden squares, which can be a mine, a digit or just blank.
The player has to reveal the squares by clicking on them. If a square containing a mine is revealed, the game is over. A digit represents the number of all adjacent mines to that cell.
If we click on a square which has no mines adjacent, the square becomes blank, and all adjacent squares will be recursively revealed.
The player uses the information from the digits to find out the mines, marking them with a flag.
The game is won by correctly finding all the mines in the board.
This is, of course, just the overview of the game, we will dig deeper on each scenario and write our code
accordingly. If you have never played minesweeper, definitely google it and play it before starting creating
your own version in Java.
Let's play it together for a while to get used to it...
Some links to get familiar to the game rules:
So, before we jump into coding, let's check first the Minesweeper game logic.
Minesweeper is a single-player board game. The grid consists of hidden squares, which can be a mine, a digit or just blank.
The player has to reveal the squares by clicking on them. If a square containing a mine is revealed, the game is over. A digit represents the number of all adjacent mines to that cell.
If we click on a square which has no mines adjacent, the square becomes blank, and all adjacent squares will be recursively revealed.
The player uses the information from the digits to find out the mines, marking them with a flag.
The game is won by correctly finding all the mines in the board.
This is, of course, just the overview of the game, we will dig deeper on each scenario and write our code
accordingly. If you have never played minesweeper, definitely google it and play it before starting creating
your own version in Java.
Let's play it together for a while to get used to it...
Some links to get familiar to the game rules:
Java OO Minesweeper - Part 1 - Set up the project with Maven and Git
Java OO Minesweeper - Part 2 - Understanding Minesweeper game logic
Code Minesweeper in Java
Java OO Minesweeper - Intro 1 - Course Overview
Java Tutorial - Creating a Minesweeper - Part 06 (Displaying numbers and mines)
Java Tutorial - Creating a Minesweeper - Part 02 (First graphics)
Java OO Minesweeper - Intro 2 - Set up the development environment
Minesweeper in Java: Part 2 (Creating the Cells)
Demo of Minesweeper GUI in Java!
Java Tutorial - Creating a Minesweeper - Part 07 (Changing mine shape and number colors)
Minesweeper Game using Java Programming with JFrame
Programming Minesweeper Game in Java, Tutorial
'Minesweeper' - Codesignal #24 - JAVA Solution
Minesweeper in Java: Part 4 (Creating the Handler Class)
Minesweeper in Java: Part 1 (Setting up the JFrame)
Java Minesweeper Adding Flag Behavior
Microsoft Minesweeper AI - Java & OpenCV based
Java I -- Sizing JFrame to JPanel Minesweeper
Minesweeper in Java: Part 5 (Tying Up Loose Ends)
Minesweeper in Java - Part 3
Java Tutorial - Creating a Minesweeper - Part 04 (Creating required arrays)
Minesweeper Part 2
Live Demonstration of Minesweeper Game using Java Swing GUI API | Java Game Project | @TechRanch
Java Tutorial - Creating a Minesweeper - Part 05 (Working on arrays and boxes)
Комментарии