reorder match arms
This commit is contained in:
parent
cbf6c62e94
commit
d40037c48c
|
@ -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),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue