public static List <Cell> ToCells(this IToken token, char image) { var cells = new List <Cell>(); while (!token.IsNil()) { var pt = token.Car().AsCons(); token = token.Cdr(); cells.Add(new Cell((int)pt.Car().AsValue(), (int)pt.Cdr().AsValue(), image)); } return(cells); }
public static List <Point> ToPoints(this IToken token) { var points = new List <Point>(); while (!token.IsNil()) { var pt = token.Car().AsCons(); token = token.Cdr(); points.Add(new Point((int)pt.Car().AsValue(), (int)pt.Cdr().AsValue())); } return(points); }