make math tiles read digits
This commit is contained in:
parent
44017f4ed5
commit
1ce5291777
2 changed files with 4 additions and 5 deletions
|
@ -150,10 +150,10 @@ impl Tile {
|
|||
}
|
||||
|
||||
pub fn read_value(&self) -> MarbleValue {
|
||||
if let Tile::Marble { value, dir: _ } = self {
|
||||
*value
|
||||
} else {
|
||||
0
|
||||
match self {
|
||||
Tile::Marble { value, dir: _ } => *value,
|
||||
Tile::Digit(d) => *d as MarbleValue,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue