redslert
yes, my actual brain
too soon
ok say i managed to write a function to do that, how would i modify the line lambert gave us to make use of the function?writing a function that checks what happens when "pl play"(Action) is a suggestion(use isAccuse)(ie checks wether the suggestion is correct .
is(Just (pl, play pl), Nothing, Just (CdG (pls ++ [(pl,cards)]) ans))
the rest is use later when you form a proper argument for accuseplay pl
theres 2 basic ways to approach step, one is to divide step into correct accusation, wrong accusation, suggestions etc and provide the output triple for each case(using guards). the other is to approach the triple in as 3 parts and apply the different conditions to them separately(using guards ....and lots of subfunctions/where clauses).Originally posted by Ragerunner
how did u alter it redslert?
I got absolutely no idea...
you can just write isAccuse (play pl) = accBAHOriginally posted by redslert
oki i guess giving u this small part to start off won't kill
but i'm not even 100% sure that it works because right now i'm not 30% through the programing....
step (CdG ((pl,cards): pls) ans)
| isAccuse (play pl) == True = accBAH
| otherwise = sugBAHBAH