mirror of
https://github.com/dancojocaru2000/ai-project-idastar.git
synced 2025-02-23 08:49:35 +02:00
Change empty from ' ' to '.' to avoid confusion
This commit is contained in:
parent
7fdd5032d5
commit
7a45a2ff7b
2 changed files with 3 additions and 1 deletions
|
@ -20,6 +20,7 @@ namespace IdaStar
|
||||||
public static CellState FromInput(this char c) => c switch
|
public static CellState FromInput(this char c) => c switch
|
||||||
{
|
{
|
||||||
'#' => CellState.OBSTACLE,
|
'#' => CellState.OBSTACLE,
|
||||||
|
'.' => CellState.EMPTY,
|
||||||
' ' => CellState.EMPTY,
|
' ' => CellState.EMPTY,
|
||||||
'S' => CellState.START,
|
'S' => CellState.START,
|
||||||
'F' => CellState.DESTINATION,
|
'F' => CellState.DESTINATION,
|
||||||
|
@ -29,7 +30,7 @@ namespace IdaStar
|
||||||
|
|
||||||
public static char ToInput(this CellState state) => state switch
|
public static char ToInput(this CellState state) => state switch
|
||||||
{
|
{
|
||||||
CellState.EMPTY => ' ',
|
CellState.EMPTY => '.',
|
||||||
CellState.OBSTACLE => '#',
|
CellState.OBSTACLE => '#',
|
||||||
CellState.START => 'S',
|
CellState.START => 'S',
|
||||||
CellState.DESTINATION => 'F',
|
CellState.DESTINATION => 'F',
|
||||||
|
|
|
@ -49,6 +49,7 @@ static void FormattedLabRow(string line) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case '.':
|
||||||
case ' ': {
|
case ' ': {
|
||||||
Console.BackgroundColor = ConsoleColor.Black;
|
Console.BackgroundColor = ConsoleColor.Black;
|
||||||
Console.Write(" ");
|
Console.Write(" ");
|
||||||
|
|
Loading…
Add table
Reference in a new issue