Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
 public ChoiceSelected(StartupVM startup)
 {
     this.Startup = startup;
 }
Exemplo n.º 6
0
 public SelectionScreenVM(StartupVM startup)
 {
     this.vm         = startup;
     this.Start      = new Button(() => this.vm.StartGame());
     this.GameChoice = new Button(() => this.vm.GameChoice());
 }