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
|