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
6d938aa0
Commit
6d938aa0
authored
2 months ago
by
JimmyTheCat
Browse files
Options
Downloads
Patches
Plain Diff
2nd Board constructor
parent
42000598
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Board.java
+8
-1
8 additions, 1 deletion
Board.java
Main.java
+0
-1
0 additions, 1 deletion
Main.java
Player.java
+1
-1
1 addition, 1 deletion
Player.java
with
9 additions
and
3 deletions
Board.java
+
8
−
1
View file @
6d938aa0
...
...
@@ -27,12 +27,19 @@ public class Board extends Thread {
* Creates the Tiles and Players and sets the player who starts the game.
*/
Board
()
{
for
(
int
i
=
0
;
i
<
tiles
.
length
;
i
++)
tiles
[
i
]
=
new
Tile
(
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
tiles
.
length
;
i
++)
tiles
[
i
]
=
new
Tile
(
this
,
0
,
0
,
0
);
for
(
int
i
=
0
;
i
<
players
.
length
;
i
++)
players
[
i
]
=
new
Player
(
i
+
1
);
currentPlayer
=
0
;
marks
=
0
;
}
Board
(
Player
[]
players
)
{
for
(
int
i
=
0
;
i
<
tiles
.
length
;
i
++)
tiles
[
i
]
=
new
Tile
(
this
,
0
,
0
,
0
);
this
.
players
=
players
;
currentPlayer
=
0
;
marks
=
0
;
}
/**Ends the turn by increasing the mark counter and changing the player.
* Additionally it ends the game when certain conditions are met.
*/
...
...
This diff is collapsed.
Click to expand it.
Main.java
+
0
−
1
View file @
6d938aa0
...
...
@@ -3,7 +3,6 @@ public class Main {
public
static
void
main
(
String
[]
args
)
{
GameUI
gui
=
new
GameUI
();
gui
.
call
(
args
);
Board
board
=
new
Board
();
//System.out.println("hi");
}
...
...
This diff is collapsed.
Click to expand it.
Player.java
+
1
−
1
View file @
6d938aa0
...
...
@@ -5,7 +5,7 @@ public class Player {
public
Player
(
int
playerNumber
)
{
this
.
playerNumber
=
playerNumber
;
playerScore
=
0
;
this
.
playerScore
=
0
;
}
public
int
getPlayerNumber
()
{
...
...
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