This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |