internal void Add(Types.PushbackSquare square) { var data = squareData[GetIndex(square.Coordinate)]; if (data.Set(square)) { data.PushbackSquareIndex = PushbackSquares.Count(); PushbackSquares.Add(data.PushbackSquare); } }
public void Clear() { foreach (var i in squareData) { i.Clear(); } PushbackSquares.Clear(); TrackNumbers.Clear(); MoveSquares.Clear(); }
internal void Remove(Types.PushbackSquare square) { var data = squareData[GetIndex(square.Coordinate)]; if (data.UnsetPushbackSquare()) { PushbackSquares.RemoveAt(data.PushbackSquareIndex); for (int i = data.PushbackSquareIndex; i < PushbackSquares.Count; i++) { squareData[GetIndex(PushbackSquares[i].Coordinate)].PushbackSquareIndex--; } } }