using System;
using System.Collections.Generic;
using UnityEngine;
class Level
{
    private Queue<Note> notes = new Queue<Note>();
    public double bpm;

    public void AddNote(Note note)
    {
        notes.Enqueue(note);
    }

    public void HandleInput(double time)
    {
        foreach(var note in notes)
        {
            if (note.Active)
                note.Judge(time);
        }
    }

    public void UpdateNotes(double time)
    {
        foreach (var note in notes)
        {
            float remainingTime = (float)(note.Time - time);
            note.Update(remainingTime);
        }
    }
}
