package Minesweeper;

import exception.InputInvalidException;
import exception.PlacementFailedException;
import game.AbstractGame;
import game.Coordinate;

public class Minesweeper extends AbstractGame{

	public Minesweeper() {
		super(new MinesweeperBoard(5));
	}

	@Override
	public void next() {
		Coordinate input;
		
		try {
			input = getConsole().getSquareCoordinates(this);
		} catch (InputInvalidException e) {
			errorMessage(e.toString());
			return;
		}
		System.out.println();

		try {
			getBoard().attemptPlace(MinesweeperBoard.OPEN, input);
		} catch (PlacementFailedException e) {
			errorMessage(e.toString());
			return;
		}

		printBoard();
		
	}

	@Override
	public void check() {
		// TODO Auto-generated method stub
		
	}

}

@@ -201,19 +201,20 @@
 ractGame
+ 
 %7B%0D%0A
-
 %0D%0A%09publi
@@ -265,9 +265,9 @@
 ard(
-5
+2
 ));%0D
@@ -329,20 +329,18 @@
 input;%0D%0A
-%09%09
 %0D%0A
+
 %09%09try %7B%0D
@@ -686,20 +686,18 @@
 ard();%0D%0A
-%09%09
 %0D%0A
+
 %09%7D%0D%0A%0D%0A%09@
@@ -736,46 +736,261 @@
 %0D%0A%09%09
-// TODO Auto-generated method stub%0D%0A%09%09
+char verify = getBoard().gameEnd();%0D%0A%0D%0A%09%09if (verify != ' ') %7B%0D%0A%09%09%09if (verify == MinesweeperBoard.BOMB.getChar()) %7B%0D%0A%09%09%09%09System.out.println(%22You lost. Good luck next time!%22);%0D%0A%09%09%09%7D else %7B%0D%0A%09%09%09%09System.out.println(%22You won!%22);%0D%0A%09%09%09%7D%0D%0A%0D%0A%09%09%09endGame();%0D%0A%09%09%7D%0D%0A
 %0D%0A%09%7D

add end condition check