public Step(Field field) { height = field.Height; width = field.Width; UsedCells = ImmutableHashSet<Cell>.Empty; Pieces = field.Pieces; CurrentPieceCells = Pieces[0].Cells; Center = GetShift(CurrentPieceCells); RunningCells = CurrentPieceCells.Select(c => new Cell(c + Center)).ToImmutableHashSet(); pieceIndex = 1 % Pieces.Count; commandIndex = 0; points = 0; }
public Game(string fileName) { field = new JsonParser(fileName).Parse(); commands = field.Commands; }