Skip to content
Snippets Groups Projects
Commit fca9f4b1 authored by Michael Danielyan's avatar Michael Danielyan
Browse files

Add turn label

parent 0484c8d2
No related branches found
No related tags found
1 merge request!6- Created the GUI for the game
......@@ -5,20 +5,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="6f0ae20a-2728-400d-b75c-1bd65c93c14b" name="Changes" comment="- Created the GUI for the game&#10;- Created field for the game &#10;- sign to place on the field changes after every turn&#10;- can place signs onto the field &#10;- cant choose the same tile on the field twice">
<change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/Controller.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/com/example/tictactoeswtha2/game-view.fxml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/tictactoeswtha2" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/HelloApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/Application.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/HelloController.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/example/tictactoeswtha2/hello-view.fxml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/tictactoeswtha2/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/tictactoeswtha2/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tictactoeswtha2/src/main/java/com/example/tictactoeswtha2/HelloApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/tictactoeswtha2/src/main/java/com/example/tictactoeswtha2/HelloApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tictactoeswtha2/src/main/java/com/example/tictactoeswtha2/HelloController.java" beforeDir="false" afterPath="$PROJECT_DIR$/tictactoeswtha2/src/main/java/com/example/tictactoeswtha2/HelloController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/Controller.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/example/tictactoeswtha2/Controller.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/com/example/tictactoeswtha2/game-view.fxml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/com/example/tictactoeswtha2/game-view.fxml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -46,21 +35,21 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_ADD_EXTERNAL_FILES": "true",
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}]]></component>
}</component>
<component name="RunManager">
<configuration name="Application" type="Application" factoryName="Application" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="com.example.tictactoeswtha2.Application" />
......
......@@ -31,6 +31,12 @@ public class Controller {
@FXML
private Label l00, l01, l02, l10, l11, l12, l20, l21, l22;
/**
* Label that shows who's turn it is.
*/
@FXML
private Label turnLabel;
/**
* turns the player sign and checks the game state
* @param row the row of the tile
......@@ -41,8 +47,10 @@ public class Controller {
if (turnSign == 'X') {
turnSign = 'O';
turnLabel.setText("O's turn");
} else {
turnSign = 'X';
turnLabel.setText("X's turn");
}
}
......
......@@ -74,6 +74,11 @@
<Font size="30.0" />
</font>
</Label>
<Label fx:id="turnLabel" layoutX="83.0" layoutY="60.0" text="X's turn">
<font>
<Font size="30.0" />
</font>
</Label>
<Label fx:id="endMessage" alignment="CENTER" layoutX="50.0" layoutY="71.0" prefHeight="37.0" prefWidth="211.0" textAlignment="CENTER" visible="false" />
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment