From c88438b92d847b2597cd221638e8ba9487f14f76 Mon Sep 17 00:00:00 2001
From: JimmyTheCat <154287729+JimmyTheCatOwO@users.noreply.github.com>
Date: Thu, 9 Jan 2025 16:47:54 +0100
Subject: [PATCH] java doc GameUI handleTurn switch and Board turnEnd adjusted

---
 Board.java  | 8 ++++++--
 GameUI.java | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Board.java b/Board.java
index 4439030..895d2e7 100644
--- a/Board.java
+++ b/Board.java
@@ -67,9 +67,13 @@ public class Board extends Thread {
     
     /**
      * Ends the turn by increasing the mark counter and changing the player.
-     * Additionally it ends the game when certain conditions are met.
+     * Defines an end state and returns it.
+     * end states:
+     * 0 = no draw, no winner
+     * 1 = current player won
+     * 2 = draw
      * 
-     * @return current player won
+     * @return end state of the turn.
      */
     public int turnEnd() {
         marks++;
diff --git a/GameUI.java b/GameUI.java
index f852ffc..48e0a3a 100644
--- a/GameUI.java
+++ b/GameUI.java
@@ -168,7 +168,9 @@ public class GameUI extends Application{
                 winnerLabel.setText("It's a draw!");
                 stage.setScene(winningScene);
                 break;
+
             default:
+                //should never be reached
                 System.out.println("How did we get here?");
                 break;
         }
-- 
GitLab