|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectExamplesJaCoP.Example
ExamplesJaCoP.MineSweeper
public class MineSweeper
It models and solves Minesweeper problem.
| Field Summary | |
|---|---|
static java.lang.String[] |
problem_kaye_splitter
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem1
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem10
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem2
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem3
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem4
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem5
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem6
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem7
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem8
One of the possible MineSweeper problems. |
static java.lang.String[] |
problem9
One of the possible MineSweeper problems. |
static java.lang.String[][] |
problems
The collection of MineSweeper problems. |
static java.lang.String[] |
problemTest
One of the possible MineSweeper problems. |
static int |
X
It represents the unknown value in the problem matrix. |
| Fields inherited from class ExamplesJaCoP.Example |
|---|
cost, search, store, vars |
| Constructor Summary | |
|---|---|
MineSweeper()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
It executes the program to solve any MineSweeper problem. |
void |
model()
It specifies a standard way of modeling the problem. |
static int[][] |
readFile(java.lang.String file)
Reads a minesweeper file. |
static int[][] |
readFromArray(java.lang.String[] description)
It transforms string representation of the problem into an array of ints representation. |
void |
searchSpecific(boolean recordSolutions)
It executes special search with solution printing to present the solutions. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int X
public static java.lang.String[] problem1
public static java.lang.String[] problem2
public static java.lang.String[] problem3
public static java.lang.String[] problem4
public static java.lang.String[] problem5
public static java.lang.String[] problem6
public static java.lang.String[] problem7
public static java.lang.String[] problem8
public static java.lang.String[] problem9
public static java.lang.String[] problem10
public static java.lang.String[] problemTest
public static java.lang.String[] problem_kaye_splitter
public static java.lang.String[][] problems
| Constructor Detail |
|---|
public MineSweeper()
| Method Detail |
|---|
public void model()
Example
model in class Examplepublic void searchSpecific(boolean recordSolutions)
recordSolutions - specifies if the solutions should be recorded.public static int[][] readFromArray(java.lang.String[] description)
description - array of strings representing the problem.
public static int[][] readFile(java.lang.String file)
file - it specifies the filename containing the problem description.
public static void main(java.lang.String[] args)
args - the filename containing the problem description.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||