1
0
Fork 0
mirror of https://github.com/dancojocaru2000/ai-project-idastar.git synced 2025-02-22 16:39:35 +02:00

Do not clear screen if showing only final result

This commit is contained in:
Kenneth Bruen 2021-12-04 14:32:56 +02:00
parent 2c74cde949
commit 024c45e5cd
Signed by: kbruen
GPG key ID: C1980A470C3EE5B1

View file

@ -37,7 +37,7 @@ if(printSteps) {
}
algoBoard.RunIdaStar();
PrintBoard(0, true);
PrintBoard(0, true, clearScreen: printSteps);
static void FormattedLabRow(string line) {
char[] characters = line.ToCharArray();
@ -108,8 +108,8 @@ string[] FormatLabyrinth(string[] labIN) {
return FormattedLabyrinth;
}
void PrintBoard(int threshold, bool done){
Console.Clear();
void PrintBoard(int threshold, bool done, bool clearScreen = true){
if (clearScreen) Console.Clear();
step++;
if(done){
Console.WriteLine("The solved labyrinth is:");