diff --git a/PuzzlePlayer/Binair.cs b/PuzzlePlayer/Binary.cs similarity index 96% rename from PuzzlePlayer/Binair.cs rename to PuzzlePlayer/Binary.cs index 2c38c4fbd2756e99a2dc664ba8a55ea1f34825dd..defa72c44efa97875adc07938a6770640880ddc6 100644 --- a/PuzzlePlayer/Binair.cs +++ b/PuzzlePlayer/Binary.cs @@ -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 diff --git a/PuzzlePlayer/Board.cs b/PuzzlePlayer/Board.cs index f22913457240cf34631017bafcae75e3e17caf99..d0658e1bd6c6c1e8ca3834b68246308e26c981d5 100644 --- a/PuzzlePlayer/Board.cs +++ b/PuzzlePlayer/Board.cs @@ -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; diff --git a/PuzzlePlayer/PuzzlePlayer.cs b/PuzzlePlayer/PuzzlePlayer.cs index 44011a4f6e6544d7bf21e5f870c0caa456dc33f8..4daa9ba6ab4af48479a93fcd27f3448609032bae 100644 --- a/PuzzlePlayer/PuzzlePlayer.cs +++ b/PuzzlePlayer/PuzzlePlayer.cs @@ -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()