Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quest system #47

Merged
merged 19 commits into from
Jun 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
improve todo output
facundoolano committed Jun 8, 2021
commit 60572ca1358d7a72ce2fd3deb642e7c68f539b6a
24 changes: 18 additions & 6 deletions src/log.rs
Original file line number Diff line number Diff line change
@@ -187,14 +187,26 @@ pub fn shop_list(game: &Game, items: Vec<Box<dyn shop::Shoppable>>) {
}

pub fn quest_list(todo: &[String], done: &[String]) {
println!("TODO:");
for quest in todo {
println!(" {}", quest);
// TODO test with a single list with [ ] and [x], maybe emoji

if !todo.is_empty() {
println!("TODO:");
for quest in todo {
println!(" - {}", quest);
}
}
println!("\nDONE:");
for quest in done {
println!(" {}", quest);

if !todo.is_empty() && !done.is_empty() {
println!();
}

if !done.is_empty() {
println!("DONE:");
for quest in done {
println!(" - {}", quest);
}
}

}

pub fn quest_done(reward: i32) {