remove area stat from solutions, add more digits to cycles and tile count in end popup
This commit is contained in:
parent
e3f8087a6b
commit
14b87e6971
3 changed files with 5 additions and 10 deletions
|
@ -7,7 +7,6 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble
|
|||
- undo/redo
|
||||
- more levels
|
||||
- make direct power (gate -> machine) work, (needs storing power direction in machine tiles)
|
||||
- story/lore
|
||||
- cut selections, copy to system clipboard
|
||||
- timestamps in solutions and blueprints
|
||||
- multiple input/output sets
|
||||
|
|
|
@ -204,7 +204,6 @@ impl Editor {
|
|||
self.score = Some(Score {
|
||||
cycles: self.machine.step_count(),
|
||||
tiles: self.source_board.count_tiles(),
|
||||
area: 0,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -520,11 +519,9 @@ impl Editor {
|
|||
d.draw_text("Level Complete!", x + 45, y + 10, 30, Color::LIME);
|
||||
if let Some(score) = &self.score {
|
||||
d.draw_text("cycles", x + 15, y + 45, 20, Color::WHITE);
|
||||
draw_usize(d, textures, score.cycles, x + 10, y + 70, 6, 2);
|
||||
d.draw_text("tiles", x + 145, y + 45, 20, Color::WHITE);
|
||||
draw_usize(d, textures, score.tiles, x + 140, y + 70, 4, 2);
|
||||
d.draw_text("area", x + 155 + 80, y + 45, 20, Color::WHITE);
|
||||
draw_usize(d, textures, score.area, x + 150 + 80, y + 70, 4, 2);
|
||||
draw_usize(d, textures, score.cycles, x + 10, y + 70, 9, 2);
|
||||
d.draw_text("tiles", x + 215, y + 45, 20, Color::WHITE);
|
||||
draw_usize(d, textures, score.tiles, x + 210, y + 70, 5, 2);
|
||||
}
|
||||
if simple_button(d, x + 10, y + 110, 140, 45) {
|
||||
self.complete_popup = Popup::Dismissed;
|
||||
|
|
|
@ -21,7 +21,6 @@ pub struct Solution {
|
|||
pub struct Score {
|
||||
pub cycles: usize,
|
||||
pub tiles: usize,
|
||||
pub area: usize,
|
||||
}
|
||||
|
||||
impl Solution {
|
||||
|
@ -59,8 +58,8 @@ impl Solution {
|
|||
pub fn score_text(&self) -> String {
|
||||
if let Some(score) = &self.score {
|
||||
format!(
|
||||
"C: {} T: {} A: {}",
|
||||
score.cycles, score.tiles, score.area
|
||||
"C: {} T: {}",
|
||||
score.cycles, score.tiles
|
||||
)
|
||||
} else {
|
||||
"unsolved".into()
|
||||
|
|
Loading…
Reference in a new issue