Buduf / PTI-Ear-Trainer

2022 Fall Semester - Tools of Software Projects (Projeszk), one big push to get this course done
MIT License
0 stars 0 forks source link

Rethink interval puzzle generation #21

Closed Buduf closed 1 year ago

Buduf commented 2 years ago

So in the EarTrainer class we generate puzzles with different intervals and notes depending on the game difficulty. First we have to generate a random Note

On the easiest difficulty the first note can be only C, and then the second note which is either the same or one seminote higher. That's how it's implemented now and other difficulties similarly. So I think it's easier to guess from small intervals and big intervals. For example, I think it's easier to hear the difference between P4 and P8, than m2 and M2.

I suggest that we store the possible intervals in some collections for different difficulties. Maybe return the colleciton from a method. And then get a random element from this collection for the puzzle.

Also, we have to randomize the first note on higher difficulties.

I'm talking about this part of the code: https://github.com/Buduf/PTI-Ear-Trainer/blob/02153b460fcc0eedf989ea65adbc8920d8bb892b/PTI-Ear-Trainer-Model/EarTrainer.cs#L31-L48

Buduf commented 2 years ago

I hope I'm understandable.

Buduf commented 1 year ago
Here's a table of possible values for different difficulties. Difficulty Possible Notes Possible Intervals
VERYEASY C P1, M2, P5, P8
EASY LowerA, C, E P1, M2, M3, P4, P5, P8
MEDIUM LowerA, C, E P1, m2, M2, m3, M3, P4, P5, M6, M7, P8
HARD LowerA, LowerB, C, D, E, F [all of them]
VERYHARD LowerA, LowerASharp .. F [all of them]
Andre2220 commented 1 year ago

Okay, It's nice, I will start to implement this.