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
9b10fae0
Commit
9b10fae0
authored
2 months ago
by
Josua Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
Tile Comments
parent
39d8f543
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tile.java
+17
-7
17 additions, 7 deletions
Tile.java
with
17 additions
and
7 deletions
Tile.java
+
17
−
7
View file @
9b10fae0
/**
* This class is an Object that is used to represent a single Tile on the playing Board.
*/
public
class
Tile
{
/**These Values are being set when initialized */
/**
* These Values are being set when initialized
*/
int
owner
=
-
1
;
/**Initializer for Tile Objects */
/**
* Initializer for Tile Objects
*/
public
Tile
(){}
/**Lets you set a new owner;
/**
* Lets you set a new owner;
* -1 = no one; 0 = Player 1; 1 = Player 2
* @param owner
*/
...
...
@@ -15,7 +22,8 @@ public class Tile {
owner
=
player
;
}
/**Returns the owner
/**
* Returns the owner
* -1 = no one; 0 = Player 1; 1 = Player 2
* @return owner
*/
...
...
@@ -23,14 +31,16 @@ public class Tile {
return
owner
;
}
/**Returns if the Tile-owner is equal to the given Player
/**
* Returns if the Tile-owner is equal to the given Player
* @param owner
*/
public
boolean
isOwner
(
int
player
){
return
owner
==
player
;
}
/**Whether this Tile is owned by a Player
/**
* Whether this Tile is owned by a Player
*/
public
boolean
existOwner
(){
return
owner
!=
-
1
;
...
...
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