Skip to content
Snippets Groups Projects
Commit b73f39d6 authored by Romain Lebouc's avatar Romain Lebouc
Browse files

JavaFX debut interface

parent effad9e0
No related branches found
No related tags found
No related merge requests found
bin/
__pycache__/
.metadata
gui/.classpath
gui/bin
gui/.project
gui/.settings
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="bin"/>
</classpath>
File added
import javafx.scene.shape.*;
public class Case {
private int rang; //N de la case (bottom right = 0, top left = 59)
private int rang; //N� de la case (bottom right = 0, top left = 59)
private int nbFish;//Nb de poissons sur la case (0 si vide)
private boolean bluePenguin; //true s'il y a un pinguin bleu sur la case
private boolean redPenguin; //true s'il y a un pinguin rouge sur la case
......
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
......@@ -9,10 +10,14 @@ import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Polygon;
public class Controller implements Initializable {
private State state;
private Process gameProcess;
@FXML
private Polygon case0;
@FXML
private Polygon case1;
private Polygon case0,case1;
//@FXML
//private Polygon case1;
@FXML
private Polygon case2;
@FXML
......@@ -135,6 +140,15 @@ public class Controller implements Initializable {
@Override
public void initialize(URL location, ResourceBundle resources) {
try {
this.gameProcess = new ProcessBuilder("../bin/theturk").start();
} catch (IOException e) {
// TODO Error message and exit
e.printStackTrace();
}
case0.setOnMouseClicked(new MyClickHandler());
case1.setOnMouseClicked(new MyClickHandler());
case2.setOnMouseClicked(new MyClickHandler());
......
public enum Player {
RED, BLUE
//TODO
}
import org.json.*;
public class State {
public void update (String json){};//TODO
public int getPenguinPos (int i, Player player)
{
//TODO
return -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