Test checkpress + correction (LES TESTS C'EST UTILE)
This commit is contained in:
parent
dd67b76d1f
commit
e2fb0d911a
3 changed files with 26 additions and 4 deletions
|
@ -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 ¬e_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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue