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()); } } }
public GameTile(Point gridPosition, GameGrid creator, int id) : this(creator, id) { GridPosition = gridPosition; }
public GameTile(GameGrid creator, int id) { m_ID = id; m_Color = GameTileColors.Schwarz; GameTileColor_Changed += creator.CollectGameTileColorChanges; }
public void GameLoop(GameStates gameState, GameGrid gameGrid) { ProcessGame(gameState, gameGrid); //UpdateUI(); }
internal TickProcessEventArgs(GameGrid gameGrid, GameStates gameState) { GameGrid = gameGrid; GameState = gameState; }