Test checkpress + correction (LES TESTS C'EST UTILE)

This commit is contained in:
Crizomb 2025-06-13 01:47:52 +02:00
parent dd67b76d1f
commit e2fb0d911a
3 changed files with 26 additions and 4 deletions

View file

@ -21,10 +21,11 @@ void NoteTile::create(float play_time, float good_interval,
std::unique_ptr<NoteTile>(new NoteTile(play_time, good_interval, place)));
}
bool NoteTile::checkPress(float press_time, NotePlaceEnum) {
bool NoteTile::checkPress(float press_time, NotePlaceEnum key_pressed) {
for (const auto &note_tile : NoteTile::existing_tiles) {
if (note_tile->play_time - note_tile->good_interval / 2 < press_time &&
note_tile->play_time + note_tile->good_interval / 2 > press_time) {
note_tile->play_time + note_tile->good_interval / 2 > press_time &&
note_tile->place == key_pressed) {
return true;
}
}