make math tiles read digits
This commit is contained in:
parent
44017f4ed5
commit
1ce5291777
2 changed files with 4 additions and 5 deletions
|
@ -10,7 +10,6 @@ copy/cut/paste selections
|
||||||
timestamps in solutions and blueprints
|
timestamps in solutions and blueprints
|
||||||
multiple input/output sets
|
multiple input/output sets
|
||||||
undo/redo
|
undo/redo
|
||||||
make math tiles read digits
|
|
||||||
tooltips
|
tooltips
|
||||||
lock tile types for early levels to make it less overwhelming
|
lock tile types for early levels to make it less overwhelming
|
||||||
display tool variant more clearly (it's not obvious there are more states)
|
display tool variant more clearly (it's not obvious there are more states)
|
||||||
|
|
|
@ -150,10 +150,10 @@ impl Tile {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read_value(&self) -> MarbleValue {
|
pub fn read_value(&self) -> MarbleValue {
|
||||||
if let Tile::Marble { value, dir: _ } = self {
|
match self {
|
||||||
*value
|
Tile::Marble { value, dir: _ } => *value,
|
||||||
} else {
|
Tile::Digit(d) => *d as MarbleValue,
|
||||||
0
|
_ => 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue