I am writing a Cardguess Game, where user sets the answer and lets the PC guess. For my project, the input card number is 2.
Then, I need to write the cardguess algorit
Hard to read your mind here, but maybe you want something like this:
startGuessing guesses state = do
feedBack <- readFeedback
let (newGuess, newState) = nextGuess (guesses, state) feedback
startGuessing (guesses ++ newGuess) newState
main = do
let (guesses, state) = initialGuess 2
startGuessing guesses state