dashboard.Grid
|> Seq.mapi ^-^ fun y sx ->
sx |> Seq.mapi ^-^ fun x s ->
if not <| s.IsEmpty && s.CellState.Color = color then
let psteps = s.CellState.motion( dashboard, new SPosition(x,y), color )
if psteps <> null then
if psteps.IsEmpty then
Some(psteps)
else
None
else None
else None
|> Seq.choose id
|> Seq.collect(fun x -> x)
|> Seq.collect(fun x -> x)
所以,我只是觉得这个序列的最后一部分(2 个字符串)很奇怪。我可以用另一种方式打开序列吗?List.ofSeq() 在这里不起作用。
谢谢你。