@Override
	public boolean isEnd() {
		int[][] grid = game.getGrid();
		for (int i = 0; i < m; i++)
			for (int j = 0; j < n; j++) {
				int k = grid[i][j];
				if (k == 0 || i < m-1 && k == grid[i+1][j] || j < n-1 && k == grid[i][j+1])
					return true;
			}
		return false;
	}