make chest's gold depend on level

This commit is contained in:
Joachim Lusiardi 2023-12-22 09:52:50 +01:00
parent db96dc5c8a
commit 6082a740e9
1 changed files with 3 additions and 1 deletions

View File

@ -22,9 +22,11 @@ pub struct Chest {
impl Chest { impl Chest {
pub fn new(position: Position) -> Self { pub fn new(position: Position) -> Self {
let level = position.get_level();
Self { Self {
position, position,
gold: 10, // TODO maybe randomize this?
gold: (level + 1) * 10,
} }
} }
} }