Browse Source

Merge pull request #2 from dancojocaru2000/dan

Change empty from ' ' to '.' to avoid confusion
master
DariusTFox24 3 years ago committed by GitHub
parent
commit
2a5c3cdbb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      IDAstar.cs
  2. 1
      Program.cs

3
IDAstar.cs

@ -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',

1
Program.cs

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

Loading…
Cancel
Save