forked from CODEScs3250/ConsoleGameHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMineSweeperGame.java
More file actions
34 lines (32 loc) · 1.15 KB
/
MineSweeperGame.java
File metadata and controls
34 lines (32 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.Optional;
/**
* A puzzle game in which the player uncovers cells on a grid.
* Some cells contain mines. Others show the number of adjacent mines.
* The player must avoid the mines and clear the safe spaces to win.
* <pre>
* Consider simulating the grid using a 2D array,
* implementing recursive revealing, and providing flagging of cells.
* </pre>
* @version 1
* @author - Chad Ninteman
* @author - Jose Ocampo
* @author - Toren Kochman
*/
class MineSweeperGame implements Game {
@Override
public String getName() {
return "MineSweeper";
}
@Override
public Optional<Integer> play() {
System.out.println("[Playing MineSweeper - Placeholder]");
System.out.println("Welcome to Minesweeper!");
System.out.println("Uncover tiles to reveal numbers or mines.");
System.out.println("Numbers tell how many of the "
+ "8 adjacent tiles are mines.");
System.out.println("Choosing a tile that contains a mine "
+ "will end the game.");
System.out.println("Uncover all safe tiles to win!");
return Optional.empty();
}
}