Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@brianmcn
brianmcn / Program.fs
Created January 31, 2022 03:40
Baba Hour
type Board =
| Board of Car[] * (Board*string*int) option // cars, (priorBoard, movedCarLabel, movedCarDiff)
member this.Cars = match this with Board(cars,_) -> cars
member this.HasPrior() = match this with Board(_,Some(_)) -> true | _ -> false
member this.IsOccupied(x,y) =
let mutable r = false
for c in this.Cars do
if c.Occupies(x,y) then
if r then