Exemplo n.º 1
0
 public TickTacToePresenter() : base()
 {
     RestartGame    = new DorCommand((o) => CreateNewGame(), new Func <bool>(() => true));
     TheGameManager = new GameManger();
     ArrayOfRows    = new ObservableCollection <Row>();
     CreateNewGame();
 }
Exemplo n.º 2
0
 public TickTacToePresenter()
     : base()
 {
     RestartGame = new DorCommand((o) => CreateNewGame(), new Func<bool>(() => true));
     TheGameManager = new GameManger();
     ArrayOfRows = new ObservableCollection<Row>();
     CreateNewGame();
 }
Exemplo n.º 3
0
Arquivo: Row.cs Projeto: dorsev/games
 public Row(GameManger m, int rowNum)
     : base(m, 0, rowNum)
 {
     Items = new ObservableCollection<GameItem>();
     for (int i = 0; i < theGameManger.MatrixHeigtWidth; i++)
     {
         Items.Add(new GameItem(m, rowNum, i));
     }
 }
Exemplo n.º 4
0
 public Row(GameManger m, int rowNum)
     : base(m, 0, rowNum)
 {
     Items = new ObservableCollection <GameItem>();
     for (int i = 0; i < theGameManger.MatrixHeigtWidth; i++)
     {
         Items.Add(new GameItem(m, rowNum, i));
     }
 }
Exemplo n.º 5
0
        public void CreateNewGame()
        {
            ///removes all board items, and remove property chnged registration
            RemoveOldHandlers();

            ///creates new board
            InitAndRegisterBoard();

            //create new GameManager,and put the last game height if there was one, otherwise put "3"
            int lastGameManger = 3;

            TheGameManager = new GameManger() { MatrixHeigtWidth = lastGameManger };
        }
Exemplo n.º 6
0
        public void CreateNewGame()
        {
            ///removes all board items, and remove property chnged registration
            RemoveOldHandlers();

            ///creates new board
            InitAndRegisterBoard();

            //create new GameManager,and put the last game height if there was one, otherwise put "3"
            int lastGameManger = 3;

            TheGameManager = new GameManger()
            {
                MatrixHeigtWidth = lastGameManger
            };
        }
Exemplo n.º 7
0
 public TickTacToeBaseItem(GameManger m, int XPosition, int YPosition)
     : base(XPosition, YPosition)
 {
     theGameManger = m;
 }
Exemplo n.º 8
0
 public TickTacToeBaseItem(GameManger m, int XPosition, int YPosition)
     : base(XPosition, YPosition)
 {
     theGameManger = m;
 }