diff --git a/Proj2.hs b/Proj2.hs index 6d4c01c..d4b01f8 100644 --- a/Proj2.hs +++ b/Proj2.hs @@ -148,12 +148,22 @@ feedback target guess = (pitches, notes, octaves) notes = matches (map note targetNoPitches) (map note guessNoPitches) octaves = matches (map octave targetNoPitches) (map octave guessNoPitches) --- TODO: comment me +-- outputs a 2-tuple of the "best first guess" and the initial game state, +-- which is all possible starting guesses. characteristics of these guesses +-- are described in the documentation for `allChords` +-- +-- currently, the best first guess is "vibes based". there is a TODO to +-- actually evaluate the best guess properly. -- initialGuess :: ([Pitch], GameState) -initialGuess = (chord, chords) +initialGuess = (bestFirstGuess, allChords) where - chord : chords = allChords + -- TODO: is this really the best first guess? + bestFirstGuess = + [ Pitch A One, + Pitch B Two, + Pitch C Three + ] -- takes in the previous guess, the game state, and the feedback for the -- previous guess and outputs the next guess and a (reduced in size) game state