<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.shape.*?>
<?import javafx.scene.text.*?>
<?scenebuilder-stylesheet Screen.css?>

<AnchorPane id="AnchorPane" fx:id="window" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="424.0" prefWidth="591.0" style="-fx-background-color: green;" styleClass="mainFxmlClass" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="minesweeper.ScreenController">
  <children>
    <Pane fx:id="myPane" minWidth="-1.0" onMousePressed="#mouseDown" onMouseReleased="#mouseUp" pickOnBounds="true" prefHeight="261.0" prefWidth="455.0" style="&#10;" AnchorPane.bottomAnchor="35.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="70.0" />
    <MenuBar prefWidth="455.0" style="-fx-background-color: white;" stylesheets="@Screen.css" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
      <menus>
        <Menu mnemonicParsing="false" text="Game">
          <items>
            <RadioMenuItem id="easyMode" fx:id="easyMode" mnemonicParsing="false" onAction="#handleDifficulty" text="Easy (9x9x10)">
              <toggleGroup>
                <ToggleGroup fx:id="Difficulty" />
              </toggleGroup>
            </RadioMenuItem>
            <RadioMenuItem fx:id="mediumMode" mnemonicParsing="false" onAction="#handleDifficulty" text="Medium (16x16x40)" toggleGroup="$Difficulty" />
            <RadioMenuItem fx:id="hardMode" mnemonicParsing="false" onAction="#handleDifficulty" selected="true" text="Hard (30x16x99)" toggleGroup="$Difficulty" />
            <RadioMenuItem fx:id="msxMode" mnemonicParsing="false" onAction="#handleDifficulty" text="MinesweeperX" toggleGroup="$Difficulty" />
                  <RadioMenuItem fx:id="fromFile" mnemonicParsing="false" onAction="#handleDifficulty" text="From file..." toggleGroup="$Difficulty" />
            <RadioMenuItem fx:id="customMode" mnemonicParsing="false" onAction="#handleDifficulty" text="Custom..." toggleGroup="$Difficulty" />
            <SeparatorMenuItem mnemonicParsing="false" text="Game type" />
                  <Menu mnemonicParsing="false" text="Game type">
                    <items>
                        <RadioMenuItem fx:id="gameTypeEasy" mnemonicParsing="false" onAction="#handleGameType" text="Easy (zero on start)">
                           <toggleGroup>
                              <ToggleGroup fx:id="gameType" />
                           </toggleGroup>
                        </RadioMenuItem>
                        <RadioMenuItem fx:id="gameTypeNormal" mnemonicParsing="false" onAction="#handleGameType" selected="true" text="Standard (safe start)" toggleGroup="$gameType" />
                        <RadioMenuItem fx:id="gameTypeHard" mnemonicParsing="false" onAction="#handleGameType" text="Hard (unsafe start)" toggleGroup="$gameType" />
                    </items>
                  </Menu>
                  <SeparatorMenuItem mnemonicParsing="false" />
                  <MenuItem fx:id="saveBoard" mnemonicParsing="false" onAction="#saveBoardHandle" text="Save board..." />
                  <SeparatorMenuItem mnemonicParsing="false" />
            <MenuItem mnemonicParsing="false" onAction="#exitGameHandle" text="Exit game" />
          </items>
        </Menu>
        <Menu mnemonicParsing="false" text="Coach">
          <items>
            <CheckMenuItem fx:id="showMove" mnemonicParsing="false" selected="true" text="Show best move" />
                  <CheckMenuItem fx:id="showTooltips" mnemonicParsing="false" selected="true" text="Show tooltips" />
            <CheckMenuItem fx:id="acceptGuess" mnemonicParsing="false" selected="false" text="Accept guesses" />
            <CheckMenuItem fx:id="showMines" mnemonicParsing="false" onAction="#showMinesToggled" text="Show mines" />
                  <CheckMenuItem fx:id="dumpTree" mnemonicParsing="false" onAction="#dumpTreeToggled" text="Dump probability tree" />
            <CheckMenuItem fx:id="probHeatMap" disable="true" mnemonicParsing="false" onAction="#probHeatMapToggled" text="Probability heat map" />
          </items>
        </Menu>
            <Menu mnemonicParsing="false" text="Options">
              <items>
                  <MenuItem mnemonicParsing="false" onAction="#handleCopyToClipboard" text="Copy seed to clipboard" />
                  <Menu mnemonicParsing="false" text="Play style">
                    <items>
                        <RadioMenuItem fx:id="psFlagging" mnemonicParsing="false" onAction="#setPlayStyle" selected="true" text="Flagging">
                           <toggleGroup>
                              <ToggleGroup fx:id="playStyle" />
                           </toggleGroup>
                        </RadioMenuItem>
                        <RadioMenuItem fx:id="psNoFlagging" mnemonicParsing="false" onAction="#setPlayStyle" text="No flagging" toggleGroup="$playStyle" />
                        <RadioMenuItem fx:id="psEfficiency" mnemonicParsing="false" onAction="#setPlayStyle" text="Efficiency" toggleGroup="$playStyle" />
                        <RadioMenuItem fx:id="psNfEfficiency" mnemonicParsing="false" onAction="#setPlayStyle" text="No flag efficiency" toggleGroup="$playStyle" />
                    </items>
                  </Menu>
                  <Menu mnemonicParsing="false" text="Guessing method">
                    <items>
                        <RadioMenuItem fx:id="standardGuess" mnemonicParsing="false" text="Safety with progress">
                           <toggleGroup>
                              <ToggleGroup fx:id="GuessType" />
                           </toggleGroup>
                        </RadioMenuItem>
                        <RadioMenuItem fx:id="secondarySafetyGuess" mnemonicParsing="false" selected="true" text="Secondary safety with progress" toggleGroup="$GuessType" />
                    </items>
                  </Menu>
                  <Menu mnemonicParsing="false" text="Random numbers">
                    <items>
                        <RadioMenuItem fx:id="rngJava" mnemonicParsing="false" selected="true" text="Java random numbers">
                           <toggleGroup>
                              <ToggleGroup fx:id="RNG" />
                           </toggleGroup>
                        </RadioMenuItem>
                        <RadioMenuItem fx:id="rngKiss64" mnemonicParsing="false" text="KISS64 random numbers" toggleGroup="$RNG" />
                    </items>
                  </Menu>
                  <Menu mnemonicParsing="false" text="Brute force analysis">
                     <items>
                        <RadioMenuItem fx:id="sol400" mnemonicParsing="false" text="400 solutions">
                           <toggleGroup>
                              <ToggleGroup fx:id="BFDA" />
                           </toggleGroup>
                        </RadioMenuItem>
                        <RadioMenuItem fx:id="sol4000" mnemonicParsing="false" selected="true" text="4000 solutions" toggleGroup="$BFDA" />
                     </items>
                  </Menu>
              </items>
            </Menu>
            <Menu mnemonicParsing="false" text="Bulk run">
               <items>
                  <MenuItem mnemonicParsing="false" onAction="#handleNewBulkRun" text="New bulk run..." />
               </items>
            </Menu>
      </menus>
    </MenuBar>
    <Label fx:id="scoreLabel" alignment="TOP_CENTER" layoutY="28.0" minHeight="24.0" prefHeight="37.0" prefWidth="56.0" style="-fx-border-color: Black; -fx-border-radius: 15; -fx-border-style: solid outside;" text="000" textAlignment="LEFT" textFill="BLACK" AnchorPane.leftAnchor="10.0">
      <font>
        <Font name="System Bold" size="24.0" fx:id="x1" />
      </font>
    </Label>
    <Label fx:id="timeLabel" alignment="TOP_CENTER" contentDisplay="LEFT" font="$x1" layoutY="28.0" prefHeight="37.0" prefWidth="56.0" style="-fx-border-color: Black; -fx-border-style: solid outside; -fx-border-radius: 15;" text="000" textAlignment="LEFT" textFill="BLACK" AnchorPane.rightAnchor="10.0" />
    <Button id="button" fx:id="automateButton" alignment="TOP_CENTER" minWidth="-Infinity" onAction="#handleAutomateButton" prefWidth="100.0" text="Automate" textAlignment="CENTER" AnchorPane.bottomAnchor="5.0" AnchorPane.leftAnchor="10.0" />
    <Circle fx:id="highlight" centerX="50.0" centerY="50.0" fill="#fff500" layoutX="281.0" layoutY="-11.0" mouseTransparent="true" opacity="0.49" radius="26.25" stroke="BLACK" strokeType="INSIDE" strokeWidth="4.0" />
      <HBox alignment="CENTER" layoutX="10.0" layoutY="28.0" minHeight="-Infinity" prefHeight="37.0" prefWidth="571.0" AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="28.0">
         <children>
          <Button fx:id="newGameButton" alignment="TOP_CENTER" minWidth="-Infinity" onAction="#handleNewGameButton" prefHeight="25.0" prefWidth="100.0" text="New Game" textAlignment="CENTER" />
         </children>
      </HBox>
  </children>
  <stylesheets>
    <URL value="@Screen.css" />
  </stylesheets>
</AnchorPane>
