You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
509 B

module Strategy0 where
import Datatypes
import VM
seswlist = cycle [MoveSE, MoveSW]
strat0 :: Game -> [Command]
strat0 game = take nsteps seswlist
where
nsteps = stepr game
stepr :: Game -> Int
stepr game = if notes == Ended
then 1
else 1 + (stepl new_game)
where
(new_game,notes) = step game MoveSE
stepl :: Game -> Int
stepl game = if notes == Ended
then 1
else 1 + (stepr new_game)
where
(new_game,notes) = step game MoveSW