text rendering + food couter, minor fixes

This commit is contained in:
programsnail 2024-07-26 20:25:52 +03:00
parent 421574ab40
commit 0d30ca5575
8 changed files with 216 additions and 17 deletions

View file

@ -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)),
});
}
}