Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TA2_SWT
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
Nick-Luis Achtmann
TA2_SWT
Commits
aa6ba3fe
Commit
aa6ba3fe
authored
2 months ago
by
Timon Harries
Committed by
Nick
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
Board capitalized
parent
cd183c71
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Fehler fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TicTacToe.java
+5
-24
5 additions, 24 deletions
TicTacToe.java
with
5 additions
and
24 deletions
TicTacToe.java
+
5
−
24
View file @
aa6ba3fe
...
...
@@ -2,35 +2,16 @@ import logic.*;
public
class
TicTacToe
{
private
static
Board
board
;
private
static
final
Actor
player
=
new
Player
();
private
static
final
Actor
enemy
=
new
Enemy
();
public
void
startGame
(){
board
=
new
Board
();
// TODO: GUI initialisieren
}
public
startGame
(){
Board
board
=
new
Board
();
// TODO: GUI
// initializeGUI(board);
}
public
static
void
main
(
String
[]
args
)
{
TicTacToe
game
=
new
TicTacToe
();
game
.
startGame
();
while
(!
board
.
checkForWin
()){
// Player move
int
[]
playerMove
=
player
.
makeMove
(
board
.
gameboard
);
board
.
placeToken
(
playerMove
[
0
],
playerMove
[
1
],
player
.
getSymbol
());
// Enemy move
int
[]
enemyMove
=
enemy
.
makeMove
(
board
.
gameboard
);
board
.
placeToken
(
enemyMove
[
0
],
enemyMove
[
1
],
enemy
.
getSymbol
());
}
// TODO Spiel beenden
// TODO Gewinner verkünden
// TODO Option zum Neustart
}
}
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