icfpc2020-galaxy-0.1.0.0: A strange message received at the Pegovka observatory

Safe HaskellNone
LanguageHaskell2010

Alien.Interaction

Synopsis

Documentation

modulate :: IntList -> [Bool] Source #

Encode a structure as a squiggly

demodulate :: [Bool] -> IntList Source #

Decode a squiggly into a structure

makeClick Source #

Arguments

:: Monad m 
=> (IntList -> m IntList)

Callback to contact the alien ship

-> (AlienState -> m ())

Executed on every change of state

-> alienValue 
-> AlienState 
-> (Integer, Integer)

Click coordinates

-> m (AlienState, [Drawing]) 

Loop the interaction until it demands a "click".

runInteraction Source #

Arguments

:: Monad m 
=> (IntList -> m IntList)

Callback to contact the alien ship

-> ([Drawing] -> m (Integer, Integer))

Callback for displaying a list of Drawings and awaiting for a "click"

-> (AlienState -> m ())

Executed on every change of state

-> alienValue 
-> AlienState

Initial state

-> m () 

Loop the interaction.