Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Created December 15, 2014 17:31
Show Gist options
  • Save bjartwolf/fd7098247f2289b7a317 to your computer and use it in GitHub Desktop.
Save bjartwolf/fd7098247f2289b7a317 to your computer and use it in GitHub Desktop.
antshort
module ant
[<EntryPoint>]
let main argv =
List.fold(fun((x,y),d,b)_-> let a=[|0;1;0;-1;0|] in let p=x+a.[d+1],y+a.[d] in p,(d+if b-set[p]=b then 3 else 1)%4,(b-set[p])+(set[p]-b))((100,100),0,set[])[0..15000] |> printfn "%A"
System.Console.ReadLine() |> ignore
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment