reorder match arms

This commit is contained in:
mos 2024-12-18 18:55:20 +01:00
parent cbf6c62e94
commit d40037c48c
1 changed files with 2 additions and 2 deletions

View File

@ -65,8 +65,8 @@ impl std::fmt::Display for Cell {
match self { match self {
Cell::Wall => 'X', Cell::Wall => 'X',
Cell::Box => '*', Cell::Box => '*',
Cell::Goal(true) => '!',
Cell::Goal(false) => '.', Cell::Goal(false) => '.',
Cell::Goal(true) => '!',
Cell::None => ' ', Cell::None => ' ',
} }
) )
@ -159,8 +159,8 @@ impl Level {
} }
'X' => Ok(Cell::Wall), 'X' => Ok(Cell::Wall),
'*' => Ok(Cell::Box), '*' => Ok(Cell::Box),
'!' => Ok(Cell::Goal(true)),
'g' => Ok(Cell::Goal(false)), 'g' => Ok(Cell::Goal(false)),
'!' => Ok(Cell::Goal(true)),
'.' => Ok(Cell::None), '.' => Ok(Cell::None),
_ => Err(ReadError::BadSymbol), _ => Err(ReadError::BadSymbol),
}) })