Esempio n. 1
0
 private void ProcessGame(GameStates gameState, GameGrid gameGrid)
 {
     if (IsGameStateRunning(gameState))
     {
         if (gameGrid.IsThereATetronimo())
         {
             gameGrid.PrepareMoveTetronimoDown();
         }
         else if (gameGrid.IsTetronimoGrounded)
         {
             var eventArgs = gameGrid.CheckForFullRow();
             if (eventArgs != null)
             {
                 NumberOfClearedRows = eventArgs.RowsComplete;
                 gameGrid.CleanUpFullRow();
                 GameGrid_RowComplete.Invoke(this, eventArgs);
             }
         }
         else
         {
             GameLogic_CreateNewTetronimo.Invoke(this, new EventArgs());
         }
     }
 }
Esempio n. 2
0
 public GameTile(Point gridPosition, GameGrid creator, int id)
     : this(creator, id)
 {
     GridPosition = gridPosition;
 }
Esempio n. 3
0
 public GameTile(GameGrid creator, int id)
 {
     m_ID    = id;
     m_Color = GameTileColors.Schwarz;
     GameTileColor_Changed += creator.CollectGameTileColorChanges;
 }
Esempio n. 4
0
        public void GameLoop(GameStates gameState, GameGrid gameGrid)
        {
            ProcessGame(gameState, gameGrid);

            //UpdateUI();
        }
Esempio n. 5
0
 internal TickProcessEventArgs(GameGrid gameGrid, GameStates gameState)
 {
     GameGrid  = gameGrid;
     GameState = gameState;
 }