public bool Push(Step step) { if (this.StepList.Exists(s => s.Equals(step))) { return false; } this.StepList.Add(step); return true; }
protected bool Equals(Step other) { return this.Row == other.Row && this.Column == other.Column && this.Number == other.Number ; }
private static void SetNumber(Chessboard chessboard, Step step) { chessboard.GetCell(step.Row, step.Column).SetNumber(step.Number); }