Snake move
Log in om je oplossingen te testen.
type Coordinate = (Int,Int)
type Direction = (Int,Int)
type Snake = [Coordinate]
extend :: Snake -> Direction -> Snake
extend old@((x,y):rest) (dx,dy) = (x+dx,y+dy):old
move :: Snake -> Direction -> Snake
move s r = undefined
Je kunt zo vaak indienen als je wenst. Er wordt enkel rekening gehouden met je laatst ingediende oplossing.
Log in om je oplossingen te testen.