mirror of
https://github.com/ProgramSnail/snake_2024.git
synced 2025-12-08 23:48:42 +00:00
text rendering + food couter, minor fixes
This commit is contained in:
parent
421574ab40
commit
0d30ca5575
8 changed files with 216 additions and 17 deletions
|
|
@ -89,12 +89,12 @@ private:
|
|||
.gen = current_gen_,
|
||||
.pos =
|
||||
{
|
||||
.x = std::rand() % config_.size.x,
|
||||
.y = std::rand() % config_.size.y,
|
||||
.x = utils::rand_to(config_.size.x),
|
||||
.y = utils::rand_to(config_.size.y),
|
||||
},
|
||||
.weight = config_.min_food_weight +
|
||||
std::rand() % std::abs(config_.max_food_weight -
|
||||
config_.min_food_weight),
|
||||
utils::rand_to(std::abs(config_.max_food_weight -
|
||||
config_.min_food_weight)),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue