step to xp
This commit is contained in:
@@ -67,10 +67,11 @@ fn main() -> Result<()> {
|
||||
height: 25,
|
||||
};
|
||||
frame.render_widget(
|
||||
Paragraph::new(format!("{}\nHealth: {}/{}\nGold: {}\nLevel: {}",
|
||||
Paragraph::new(format!("{}\nHealth: {}/{}\nExp: {}\nGold: {}\nLevel: {}",
|
||||
game.get_player().get_name(),
|
||||
game.get_player().get_life(),
|
||||
game.get_player().get_max_life(),
|
||||
game.get_player().get_experience(),
|
||||
game.get_player().get_gold(),
|
||||
game.get_player().get_immutable_position().get_level()))
|
||||
.white()
|
||||
@@ -131,6 +132,7 @@ fn main() -> Result<()> {
|
||||
"Congratulation! You mastered your way through the dungeon and won the game.".to_string()
|
||||
}
|
||||
};
|
||||
text += format!("\nYou gained {} experience.", game.get_player().get_experience()).as_str();
|
||||
text += format!("\nYou collected {} gold.", game.get_player().get_gold()).as_str();
|
||||
let paragraph = Paragraph::new(text).block(block).wrap(Wrap { trim: true });
|
||||
frame.render_widget(paragraph, area);
|
||||
|
||||
Reference in New Issue
Block a user