Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tick-Tack-Trauma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Josua Oppermann
Tick-Tack-Trauma
Commits
c88438b9
Commit
c88438b9
authored
2 months ago
by
JimmyTheCat
Browse files
Options
Downloads
Patches
Plain Diff
java doc GameUI handleTurn switch and Board turnEnd adjusted
parent
f507b533
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Board.java
+6
-2
6 additions, 2 deletions
Board.java
GameUI.java
+2
-0
2 additions, 0 deletions
GameUI.java
with
8 additions
and
2 deletions
Board.java
+
6
−
2
View file @
c88438b9
...
@@ -67,9 +67,13 @@ public class Board extends Thread {
...
@@ -67,9 +67,13 @@ public class Board extends Thread {
/**
/**
* Ends the turn by increasing the mark counter and changing the player.
* 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
()
{
public
int
turnEnd
()
{
marks
++;
marks
++;
...
...
This diff is collapsed.
Click to expand it.
GameUI.java
+
2
−
0
View file @
c88438b9
...
@@ -168,7 +168,9 @@ public class GameUI extends Application{
...
@@ -168,7 +168,9 @@ public class GameUI extends Application{
winnerLabel
.
setText
(
"It's a draw!"
);
winnerLabel
.
setText
(
"It's a draw!"
);
stage
.
setScene
(
winningScene
);
stage
.
setScene
(
winningScene
);
break
;
break
;
default
:
default
:
//should never be reached
System
.
out
.
println
(
"How did we get here?"
);
System
.
out
.
println
(
"How did we get here?"
);
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment