Daniel-Martinez / Tags

Tags
0 stars 0 forks source link

On GUI create the ability to start and stop the Game. #40

Closed Daniel-Martinez closed 10 years ago

Daniel-Martinez commented 10 years ago

Need to create a way to start the game after any configuration of our application has been set. I envision the ability to select Real launcher, start the webcam, select a game to play, click on the Attack method we want to use. After all of these settings are implemented hitting start will automate our attack algorithm we have chosen.

Daniel-Martinez commented 10 years ago

Created the following method to bind to Start button: private void Start() { if (m_selectedLauncher != null) { m_tempServer.StopRunningGame(); m_tempServer.StartGame(m_gameChoice); m_selectedLauncher.Position(Targets); } }

the method Position passes the List and evaluates the Phi, Theta values and will fire on a target if they are enemies.

The following method implements Stop. private void Stop() { if (m_tempServer != null) { m_tempServer.StopRunningGame(); MessageBox.Show("Game Over"); } }

The Message"Box displays that the game has ended.