Skip to content

Commit 666b132

Browse files
authored
v0.2.10: Prints correct code after guess
1 parent 290039b commit 666b132

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mastermind-rs"
3-
version = "0.2.8"
3+
version = "0.2.10"
44
authors = ["Sergey Lavrent"]
55
edition = "2021"
66
description = "A TUI game based on Mastermind/Bulls & Cows"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Utilizes the \"cursive\" crate for building TUIs.
6868
.child(
6969
TextView::new(
7070
"
71-
v. 0.2.9 - GPLv3 License ",
71+
v. 0.2.10 - GPLv3 License ",
7272
)
7373
.style(Color::Dark(BaseColor::Blue)),
7474
),

src/logic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn print_feedback(s: &mut Cursive, guess: &str, feedback: String) {
106106
if feedback.chars().all(|c| c == '!') {
107107
s.call_on_name("input", |v: &mut EditView| v.disable());
108108
s.add_layer(
109-
Dialog::around(TextView::new("Congratulations!").style(Color::Dark(BaseColor::Blue)))
109+
Dialog::around(TextView::new(format!("{guess} was the correct code.")).style(Color::Dark(BaseColor::Blue)))
110110
.title("You won!")
111111
.button("Ok", |s| {
112112
s.pop_layer();

0 commit comments

Comments
 (0)