
package o1.football2

import o1.football2.gui.OngoingMatchDialog
import o1.gui.*
import o1.gui.Dialog.*
import o1.util.nice.collection.*


/** A simple application that you can use to experiment with some methods in the package
  * `o1.football2`. Prompts the user for a couple of clubs and sets up a GUI window for
  * recording goals in a match between them.
  *
  * **NOTE TO STUDENTS: In this course, you don’t need to understand how this program works
  * on the inside. It’s enough to know that you can use this file to start the program.** */
@main def testSingleMatch() =
  given locationOfInitialDialogs: Position = Centered
  for
    home <- requestChoice("Home team:", ExampleLeague.Clubs)
    away <- requestChoice("Away team:", ExampleLeague.Clubs.except(home))
  do
    val dialog = new OngoingMatchDialog(home, away) with TerminatesOnClose with O1WindowDefaults
    dialog.centerOnScreen()
    dialog.open()

