internal void SyncRepresentationToGameGrid(object sender, GameTileColorChangedEventArgs e) { var foundControls = gameBox.Controls.Find(e.NewGameTile.ID.ToString(), false); foreach (PictureBox pictureControl in foundControls) { pictureControl.Image = TetronimoConverter.SelectBlockImage(e.NewGameTile.Color); pictureControl.Invalidate(); } }
public GameForm() { m_CurrentTetronimo = new List <GameTile>(4); m_TetronimoConverter = new TetronimoConverter(); m_GameController = new GameController(); m_GameTicks = new Timer(); m_GameTicks.Interval = m_LastTick; // One Second Intervall InitializeComponent(); m_GameController.HookUpEvents(this); m_GameTicks.Tick += GameTicks_Tick; GameForm_Initialise += GameForm_GameForm_Initialise; }
public GameGrid() { m_GameGrid = new GameTile[10, 34];// Letzten Vier Reihen befinden sich über dem SpielFeld -> für Blockspawning m_TConverter = new TetronimoConverter(); }