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

score comments added

parent c7367467
No related branches found
No related tags found
No related merge requests found
{
"java.project.referencedLibraries": [
"lib/**/*.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.base.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.controls.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.fxml.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.graphics.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.media.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.swing.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx.web.jar",
"/home/derrentner/.javalib/javafx-sdk-23.0.1/lib/javafx-swt.jar"
]
}
\ No newline at end of file
......@@ -53,6 +53,7 @@ public class Board extends Thread {
}
if(currentPlayer == tiles[0].get_owner() && currentPlayer == tiles[4].get_owner() && currentPlayer == tiles[8].get_owner()) victory = true;
if(currentPlayer == tiles[2].get_owner() && currentPlayer == tiles[4].get_owner() && currentPlayer == tiles[6].get_owner()) victory = true;
//if(victory) currentPlayer.playerScore++;
return victory;
}
}
public class Player {
// score?
//private int playerScore = 0;
private int playerNumber;
......
......@@ -22,17 +22,13 @@ public class Tile {
}
/**Returns if the Tile-owner is equal to the given Player
*
* @param owner
* @return
*/
public boolean is_owner(int player){
return owner == player;
}
/**Whether this Tile is owned by a Player
*
* @return
*/
public boolean exist_owner(){
return owner > 0;
......
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