private PegBoard(IPegBoardSource pegBoardSource) { Columns = pegBoardSource.Columns * 2 - 1; Rows = pegBoardSource.Rows; Goal = pegBoardSource.Goal; MissingPegs = pegBoardSource.MissingPegs; GoalPeg = Peg.Create(pegBoardSource.Rows, pegBoardSource.Goal * 2 + 1); _pegsFactory = new Peg.Factory(Rows, Columns, MissingPegs); }
public static PegBoard FromSource(IPegBoardSource pegBoardSource) { return(new PegBoard(pegBoardSource)); }