public UndoBoard(IBoardActions boardActions, IBoardQuery boardQuery, Mover fancy, Mover simple, Mover instant) { if (fancy == null) { throw new ArgumentNullException("fancy"); } if (simple == null) { throw new ArgumentNullException("simple"); } if (instant == null) { throw new ArgumentNullException("instant"); } if (boardQuery == null) { throw new ArgumentNullException("boardQuery"); } if (boardActions == null) { throw new ArgumentNullException("boardActions"); } this.fancy = fancy; this.simple = simple; this.instant = instant; this.boardQuery = boardQuery; this.boardActions = boardActions; }
ScoreBoard InstallScoreBoard(IBoardActions boardActions, IBoardQuery boardQuery) { var undoBoard = new UndoBoard(boardActions, boardQuery, new MoverRotateAsync(), new MoverSlideAsync(), new MoverImmediate()); var scoreBoard = new ScoreBoard(undoBoard, undoBoard); return(scoreBoard); }
public void Init(IGameActions gameActions, IBoardQuery boardQuery, IDeck deck) { if (gameActions == null) { throw new ArgumentNullException("gameActions"); } if (boardQuery == null) { throw new ArgumentNullException("boardQuery"); } if (deck == null) { throw new ArgumentNullException("deck"); } this.gameActions = gameActions; this.boardQuery = boardQuery; this.deck = deck; }