Add some sample cows.
This commit is contained in:
parent
321df82944
commit
52001a23e5
11
src/Cdl/SampleCows.hs
Normal file
11
src/Cdl/SampleCows.hs
Normal file
|
@ -0,0 +1,11 @@
|
|||
module Cdl.SampleCows where
|
||||
import Cdl.Cow
|
||||
|
||||
regularPolygonCow :: Int -> CowBehavior ()
|
||||
regularPolygonCow n = repeatTimes n $ move 10 >> return (360 `div` n)
|
||||
|
||||
squareCow :: CowBehavior ()
|
||||
squareCow = repeatTimes 4 $ move 10 >> turn 90
|
||||
|
||||
pacingCow :: CowBehavior ()
|
||||
pacingCow = move 10 >> turn 180 >> move 10
|
Loading…
Reference in New Issue
Block a user