Skip to content

Instantly share code, notes, and snippets.

View Program.fs
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