Skip to content
Snippets Groups Projects
Commit 9b10fae0 authored by Josua Oppermann's avatar Josua Oppermann
Browse files

Tile Comments

parent 39d8f543
No related branches found
No related tags found
No related merge requests found
/**
* 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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment