public PuzzleVM(StartupVM startup, IPlayablePuzzle IplayablePuzzle) { this.wrapped = IplayablePuzzle; this.StartupVM = startup; this.PiCrossFacade = new PiCrossFacade(); this.Grid = this.wrapped.Grid.Map(puzzleSquare => new SquareVM(puzzleSquare)).Copy(); }
public PuzzleVM(StartupVM startup, Puzzle playablePuzzle) { var puzzle = playablePuzzle; this.StartupVM = startup; this.PiCrossFacade = new PiCrossFacade(); this.wrapped = PiCrossFacade.CreatePlayablePuzzle(puzzle); this.Grid = this.wrapped.Grid.Map(puzzleSquare => new SquareVM(puzzleSquare)).Copy(); }
public PuzzleVM(StartupVM startup) { var puzzle = Puzzle.FromRowStrings( "xxxxx", "x...x", "x...x", "x...x", "xxxxx" ); this.StartupVM = startup; this.PiCrossFacade = new PiCrossFacade(); this.wrapped = PiCrossFacade.CreatePlayablePuzzle(puzzle); this.Grid = this.wrapped.Grid.Map(puzzleSquare => new SquareVM(puzzleSquare)).Copy(); }
public GameChoiceVM(StartupVM startup) { this.StartupVM = startup; Puzzle puzzle1 = Puzzle.FromRowStrings( "xxxxx", "x...x", "x...x", "x...x", "xxxxx" ); Puzzle puzzle2 = Puzzle.FromRowStrings( "x.x.x", ".x.x.", "x.x.x", ".x.x.", "x.x.x" ); Puzzle puzzle3 = Puzzle.FromRowStrings( ".....", "..x..", ".xxx.", "..x..", "....." ); this.Puzzles = new ArrayList(); this.Puzzles.Add(this.StartupVM.PiCrossFacade.CreatePlayablePuzzle(puzzle1)); this.Puzzles.Add(this.StartupVM.PiCrossFacade.CreatePlayablePuzzle(puzzle2)); this.Puzzles.Add(this.StartupVM.PiCrossFacade.CreatePlayablePuzzle(puzzle3)); this.ChoiceSelectedClicked = new ChoiceSelected(StartupVM); }
public ChoiceSelected(StartupVM startup) { this.Startup = startup; }
public SelectionScreenVM(StartupVM startup) { this.vm = startup; this.Start = new Button(() => this.vm.StartGame()); this.GameChoice = new Button(() => this.vm.GameChoice()); }