1
0
Fork 0
mirror of https://github.com/dancojocaru2000/ai-project-idastar.git synced 2025-02-23 00:49:34 +02:00

Merge pull request #2 from dancojocaru2000/dan

Change empty from ' ' to '.' to avoid confusion
This commit is contained in:
DariusTFox24 2021-12-05 00:07:39 +02:00 committed by GitHub
commit 2a5c3cdbb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -20,6 +20,7 @@ namespace IdaStar
public static CellState FromInput(this char c) => c switch
{
'#' => CellState.OBSTACLE,
'.' => CellState.EMPTY,
' ' => CellState.EMPTY,
'S' => CellState.START,
'F' => CellState.DESTINATION,
@ -29,7 +30,7 @@ namespace IdaStar
public static char ToInput(this CellState state) => state switch
{
CellState.EMPTY => ' ',
CellState.EMPTY => '.',
CellState.OBSTACLE => '#',
CellState.START => 'S',
CellState.DESTINATION => 'F',

View file

@ -49,6 +49,7 @@ static void FormattedLabRow(string line) {
break;
}
case '.':
case ' ': {
Console.BackgroundColor = ConsoleColor.Black;
Console.Write(" ");