Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TicTacToe
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
Jan Peter Schweers
TicTacToe
Commits
bd8dd5bb
Commit
bd8dd5bb
authored
2 months ago
by
Marc Daginnus
Browse files
Options
Downloads
Patches
Plain Diff
Test 19889
parent
bfd51a2a
No related branches found
Branches containing commit
No related tags found
3 merge requests
!6
Add final version of the game to main branch
,
!4
Merge TicTacToc basics into develop
,
!3
Draft: Basic tic tac toe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/example/tictactoe_game/TicTacToeFX.java
+33
-0
33 additions, 0 deletions
src/main/java/com/example/tictactoe_game/TicTacToeFX.java
with
33 additions
and
0 deletions
src/main/java/com/example/tictactoe_game/TicTacToeFX.java
0 → 100644
+
33
−
0
View file @
bd8dd5bb
import
javafx.application.Application
;
import
javafx.scene.Scene
;
import
javafx.scene.control.Button
;
import
javafx.scene.layout.GridPane
;
import
javafx.stage.Stage
;
public
class
TicTacToeFX
extends
Application
{
@Override
public
void
start
(
Stage
primaryStage
)
{
// Erstelle das GridPane für das Spielfeld
GridPane
grid
=
new
GridPane
();
// 3x3 Buttons hinzufügen
for
(
int
row
=
0
;
row
<
3
;
row
++)
{
for
(
int
col
=
0
;
col
<
3
;
col
++)
{
Button
button
=
new
Button
();
button
.
setPrefSize
(
100
,
100
);
// Größe der Buttons
grid
.
add
(
button
,
col
,
row
);
// Hinzufügen zum Grid
}
}
// Szene und Stage erstellen
Scene
scene
=
new
Scene
(
grid
,
300
,
300
);
// Größe der Szene
primaryStage
.
setTitle
(
"Tic-Tac-Toe"
);
primaryStage
.
setScene
(
scene
);
primaryStage
.
show
();
}
public
static
void
main
(
String
[]
args
)
{
launch
(
args
);
}
}
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