Exemplo n.º 1
0
        public GameImages(Grid grid, GameWindowData gameWindowData)
            : this()
        {
            _grid           = grid;
            _gameWindowData = gameWindowData;

            InitialzeResultColumnImages();
            InitializeGameColumnImages();
            InitializeAdditionalColumnImages();
            InitializeCards();
        }
Exemplo n.º 2
0
        public GameProcess(Grid grid)
        {
            GameWindowData = new GameWindowData();
            GameData       = new GameData();
            _history       = new History();

            _grid = grid;

            //additional data
            GameWindowData.iGridColDeck  = 1;
            GameWindowData.iGridColKing  = grid.ColumnDefinitions.Count / 2 + 1;
            GameWindowData.iGridColJoker = grid.ColumnDefinitions.Count - 2;

            this.GameImages  = new GameImages(_grid, GameWindowData);
            this.GameColumns = new GameColumns(AlignDeckSequence);

            Timer = new System.Windows.Threading.DispatcherTimer();

            Timer.Tick    += timerTick;
            Timer.Interval = new TimeSpan(0, 0, 1);

            GameImages.SetEvents(card_MouseDown, card_Drop, Deck_MouseUp);
        }