Skip to content

Instantly share code, notes, and snippets.

@1tgr
Created December 4, 2012 22:59
Show Gist options
  • Select an option

  • Save 1tgr/4209974 to your computer and use it in GitHub Desktop.

Select an option

Save 1tgr/4209974 to your computer and use it in GitHub Desktop.

Maze

A Unicode maze, inspired by 10 PRINT CHR$ (205.5 + RND (1)); : GOTO 10.

open System
let r = Random() in for j in 1 .. 25 do Console.WriteLine (String([| for i in 1 .. 80 -> char (0x2571 + r.Next(0, 2)) |]))
// Output
╲╱╲╱╱╲╱╱╱╱╱╱╱╱╱╱╱╲╲╲╱╱╱╱╱╲╱╱╲╱╲╱╱╲╲╲╱╲╱╱╲╲╲╲╱╲╱╱╲╱╱╲╲╱╲╲╱╱╱╱╲╱╲╲╲╲╲╲╱╱╲╲╱╲╱╱╱╲╱╱
╲╲╱╱╲╲╱╱╱╱╲╱╲╱╲╱╱╱╲╱╲╲╲╲╲╲╱╱╲╱╱╲╲╲╲╲╲╱╱╱╲╲╱╱╱╱╲╲╱╲╱╱╲╱╲╲╲╲╲╲╱╲╱╱╱╱╲╱╲╲╲╱╱╲╱╲╱╲╱╱
╱╱╱╱╲╲╲╲╲╲╲╱╱╱╲╲╲╱╲╱╲╲╱╱╱╲╱╲╲╲╱╲╱╲╲╲╲╲╱╱╱╱╱╲╲╱╱╲╱╲╱╱╱╲╲╱╱╱╱╲╱╱╲╲╲╱╲╱╱╲╱╲╲╲╱╲╱╱╱╲
╲╲╲╱╲╲╲╱╱╱╲╲╲╱╲╱╱╱╱╲╱╲╱╱╲╱╲╲╲╲╲╲╲╱╲╲╱╲╱╲╱╲╱╲╱╱╱╱╲╱╱╱╱╲╲╱╱╱╱╲╱╱╲╱╲╲╱╱╱╲╲╲╱╲╱╲╱╲╱╱
╲╱╲╲╱╲╲╱╲╱╲╲╱╲╱╱╲╱╱╱╱╱╲╲╱╲╲╲╱╲╱╱╱╱╲╱╱╱╲╲╱╱╱╲╲╱╱╲╱╱╲╱╱╱╲╲╱╱╱╲╲╱╲╲╱╱╲╱╲╱╲╲╱╲╱╱╱╲╲╱
╱╱╱╲╲╱╱╱╱╱╱╱╲╱╲╱╱╱╲╲╲╱╲╱╲╱╲╲╲╲╱╱╱╱╱╲╲╱╱╱╱╱╲╲╲╱╲╱╲╲╱╲╱╱╲╲╱╱╱╱╱╱╱╱╲╱╱╲╲╲╱╲╱╲╱╱╲╱╱╱
╲╲╱╱╲╲╲╲╲╱╲╱╱╲╲╲╱╱╲╲╱╲╱╲╱╱╲╱╱╱╱╱╲╲╲╲╱╱╲╱╱╱╱╲╱╲╲╲╱╲╱╱╱╱╲╱╱╱╲╱╱╱╲╱╲╱╲╱╱╲╱╲╲╲╲╱╲╲╲╱
╲╲╱╱╱╱╱╱╱╲╱╱╲╲╲╲╱╲╲╲╱╱╲╱╱╱╱╱╲╲╱╲╲╱╲╱╱╱╱╲╱╱╱╱╱╱╱╲╱╱╲╲╲╲╱╱╱╱╱╲╲╲╲╲╱╲╲╱╲╲╲╲╲╱╲╱╱╱╲╱
╱╱╱╲╲╱╲╲╲╱╲╱╱╲╲╱╲╲╱╲╱╲╱╱╱╱╱╲╱╱╱╱╱╲╲╱╲╲╱╲╲╲╱╱╲╲╲╱╲╱╱╲╲╱╲╱╱╲╱╲╱╲╲╲╱╲╲╲╲╱╲╲╲╱╲╲╱╲╱╲
╲╱╱╱╲╱╱╱╲╱╱╲╱╱╲╲╲╲╲╱╲╲╱╱╱╱╱╲╱╱╲╲╲╲╱╲╲╲╲╱╱╲╲╱╱╲╱╱╱╱╱╲╲╲╱╲╱╲╲╱╱╲╱╲╲╱╱╲╱╱╱╲╲╲╱╲╱╲╱╱
╱╱╱╲╲╱╱╲╲╱╲╲╱╲╲╲╲╲╲╲╲╲╲╱╲╱╱╲╲╱╱╱╲╱╱╱╱╱╲╱╱╱╱╲╱╱╲╱╱╱╱╲╲╱╲╲╱╲╱╲╱╱╱╱╱╱╱╲╱╲╱╲╲╲╲╱╱╲╱╲
╱╲╲╱╱╲╲╱╲╲╲╱╱╱╱╲╱╲╲╲╲╱╲╱╱╱╲╱╲╱╱╲╲╱╲╱╲╲╱╲╲╱╲╱╲╱╲╲╱╲╱╱╲╱╲╲╲╱╱╲╲╱╱╲╲╱╲╲╲╲╱╲╲╱╲╲╲╱╲╲
╲╱╲╲╱╲╲╲╲╲╱╱╲╱╲╲╲╲╲╲╲╱╲╱╲╱╱╲╱╱╲╲╲╱╱╲╱╲╲╲╲╲╲╲╲╲╱╲╲╱╲╱╱╱╱╱╱╱╲╲╲╲╱╲╲╲╲╱╲╲╱╱╲╱╱╲╱╲╲╱
╱╲╱╲╱╲╱╱╱╲╱╱╲╱╲╲╲╱╱╲╲╲╲╲╱╲╱╱╱╲╱╱╲╲╱╲╲╱╲╲╱╲╱╱╱╲╱╲╱╱╲╱╲╲╲╲╲╱╱╲╲╱╱╱╲╱╱╱╲╱╲╱╱╱╱╱╲╲╱╱
╱╱╲╲╲╲╲╲╱╲╱╱╱╲╱╱╱╲╱╱╱╱╱╱╱╲╲╱╱╱╱╱╲╱╱╲╲╱╲╲╲╲╱╱╲╱╱╱╱╱╲╲╱╱╲╲╱╱╱╲╲╱╱╲╲╱╲╱╲╲╲╲╲╲╲╲╱╲╱╱
╲╱╱╱╱╱╲╲╱╱╱╱╱╲╲╱╱╱╲╲╲╱╲╱╱╱╲╲╲╱╲╱╲╱╱╱╲╲╱╱╱╱╲╱╱╲╲╱╲╱╱╲╱╲╱╲╲╱╱╱╱╱╲╲╲╱╱╲╲╱╲╲╲╱╱╲╱╲╱╲
╱╲╲╱╲╲╲╱╱╲╲╲╲╱╱╱╱╲╱╲╱╲╱╱╲╲╱╱╲╱╱╲╱╱╲╱╱╲╲╲╲╱╲╱╲╱╲╲╱╲╲╱╱╱╱╲╲╲╲╱╲╲╱╲╱╲╲╲╱╲╱╱╱╱╱╲╲╲╲╱
╱╱╲╲╲╱╱╲╲╱╲╱╲╲╱╱╲╲╱╲╲╱╲╲╲╱╱╲╱╲╲╲╱╱╱╱╲╲╱╱╲╲╲╲╲╲╲╱╱╲╲╲╲╲╲╱╱╱╱╱╲╲╲╱╱╲╱╱╲╲╲╱╲╱╱╲╱╲╲╲
╲╲╲╱╲╱╱╱╲╱╱╱╲╱╱╱╱╱╲╲╲╱╲╲╱╲╱╲╲╲╲╲╱╲╲╱╲╱╲╱╲╲╲╲╲╱╲╲╲╱╲╲╱╲╲╱╲╱╱╲╲╲╱╲╱╱╲╲╱╱╱╲╲╱╱╲╲╱╲╲
╱╲╲╲╲╲╱╲╲╱╱╲╱╲╱╲╲╲╱╱╱╲╱╲╲╲╱╲╲╲╲╲╱╱╲╱╱╲╱╱╱╱╲╱╲╲╲╱╲╱╱╲╱╲╲╲╲╲╲╱╲╱╲╱╱╱╱╲╱╱╲╲╲╲╱╲╲╲╲╱
╱╲╲╱╲╲╲╲╱╲╱╱╲╲╲╲╱╲╲╱╱╲╱╲╲╱╱╱╲╲╱╲╲╱╲╱╲╲╲╱╲╲╲╱╱╲╲╲╱╱╱╲╲╱╱╱╱╱╱╱╲╲╱╲╲╱╱╱╱╱╱╲╱╲╲╲╱╱╱╱
╲╱╲╱╱╱╱╲╱╲╲╱╲╲╲╱╱╲╱╲╱╱╲╲╱╲╱╱╲╲╱╱╲╱╱╱╲╱╱╲╱╲╱╲╲╲╲╲╱╱╱╱╲╲╲╱╲╱╲╲╲╲╲╱╱╱╱╱╱╱╲╱╲╲╱╲╱╱╲╲
╲╲╱╱╱╲╱╱╲╱╲╲╱╲╲╱╲╲╱╲╲╲╲╲╲╲╱╱╱╱╲╲╱╱╲╱╲╲╱╱╲╲╲╲╲╲╲╱╱╱╲╱╲╱╲╱╱╱╱╲╲╱╱╲╲╲╱╱╲╲╲╱╲╲╲╲╱╱╱╲
╱╱╱╱╱╲╲╲╱╱╱╲╱╱╲╲╲╱╱╲╲╲╱╲╲╲╱╱╲╱╱╱╱╲╱╲╱╱╱╲╲╲╲╲╱╲╲╱╲╱╲╲╲╱╱╱╲╲╱╲╱╲╱╲╲╱╱╲╱╱╱╲╲╱╱╲╲╲╱╲
╲╱╱╱╲╱╱╲╱╱╲╲╲╲╲╲╲╲╲╱╲╱╱╲╲╲╱╲╱╱╱╱╱╲╲╲╲╲╱╲╲╲╱╲╱╲╱╲╱╱╱╱╲╲╱╱╲╲╲╱╱╲╱╲╲╲╱╲╱╲╱╲╲╱╱╲╲╱╱╱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment