12 lines
305 B
Haskell
12 lines
305 B
Haskell
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
|