Skip to content
Snippets Groups Projects
Commit c32dc198 authored by bionic85's avatar bionic85
Browse files

Binair naar Binary veranderd

parent a2856307
No related branches found
No related tags found
No related merge requests found
......@@ -11,15 +11,17 @@ namespace PuzzlePlayer_Namespace
* The empty space is a constant defined in the abstract Board class
*/
internal class Binair : Board
internal class Binary : Board
{
// constructor with baordSize parameter (default is set to 8 but can be changed)
public Binair(int boardSize = 8)
public Binary(int boardSize = 8)
{
// create a board with the specifide size
boardState = new int[boardSize,boardSize];
Info = "";
// clear the board (fill it in with -1)
Clear();
}
......@@ -76,4 +78,4 @@ namespace PuzzlePlayer_Namespace
throw new NotImplementedException();
}
}
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ namespace PuzzlePlayer_Namespace
public abstract class Board
{
protected const int emptySpace = -1; // for every puzzle -1 represents a empty space
public string Info;
// a property for getting and setting the boardsstate. The boardstate should only be setted if the imputed int[,] is valid.
public int[,] boardState
......@@ -25,7 +26,7 @@ namespace PuzzlePlayer_Namespace
}
// a methode for solving the whole board. It uses the private SolveStep methode untill the whole board is solved
public int[,] Solve(int[,] boardToSolve)
public Board Solve()
{
// two variables for storing the result and the next solveStep
int[,] result = boardToSolve;
......
......@@ -33,7 +33,7 @@ namespace PuzzlePlayer_Namespace
private void SetUpPuzzleForms()
{
puzzleForms.Add(new PuzzleForm(new Binair()));
puzzleForms.Add(new PuzzleForm(new Binary()));
}
private void SetUpUI()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment