IHM view
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
package main;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Configuration {
|
||||
private int nombreJoueurs;
|
||||
private int nombreJoueursHumains;
|
||||
private List<String> nomsJoueurs;
|
||||
|
||||
//TODO : attribut pour prendre en compte si jeu est normal ou demarrage rapide?
|
||||
|
||||
public Configuration (int nj, int njh) {
|
||||
public Configuration (List<String> nomsJoueurs,int nj, int njh) {
|
||||
this.nomsJoueurs = nomsJoueurs;
|
||||
nombreJoueurs = nj;
|
||||
nombreJoueursHumains = njh;
|
||||
}
|
||||
|
@ -3,14 +3,14 @@ package main;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.sun.tools.javac.Main;
|
||||
|
||||
import effet.Effet;
|
||||
|
||||
public class GestionnaireJeu {
|
||||
|
||||
|
||||
private Plateau plateau;
|
||||
private View view;
|
||||
|
||||
|
||||
|
||||
public GestionnaireJeu() {
|
||||
@ -19,16 +19,14 @@ public class GestionnaireJeu {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
switch(1){
|
||||
|
||||
case 1:
|
||||
lancerPartie();
|
||||
case 2:
|
||||
lancerConfiguration();
|
||||
default:
|
||||
break;
|
||||
|
||||
try {
|
||||
Main.main(null);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Plateau getPlateau() {
|
||||
@ -48,6 +46,8 @@ public class GestionnaireJeu {
|
||||
}
|
||||
|
||||
public static Configuration lancerConfiguration() {
|
||||
|
||||
|
||||
//TODO
|
||||
return null;
|
||||
}
|
||||
|
@ -1,25 +1,44 @@
|
||||
package main;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
import java.util.List;
|
||||
|
||||
public class View extends Application{
|
||||
public class View{
|
||||
|
||||
private static View view;
|
||||
|
||||
private View() {}
|
||||
|
||||
|
||||
static {
|
||||
try {
|
||||
view = new View();
|
||||
}catch(Exception e) {
|
||||
throw new RuntimeException("View Singleton");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception{
|
||||
Parent root = FXMLLoader.load(getClass().getResource("ressources/Plateau.fxml"));
|
||||
primaryStage.setTitle("Shadow Hunters");
|
||||
primaryStage.setScene(new Scene(root));
|
||||
primaryStage.show();
|
||||
}
|
||||
public static View getView() {
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
public static void initPartie(List<Joueur> joueurs) {
|
||||
|
||||
}
|
||||
|
||||
public static void lancerPartie() {
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
public static void menu() throws Exception {
|
||||
|
||||
}
|
||||
|
||||
public void applyConfiguration(GestionnaireJeu gj,Configuration c) {
|
||||
|
||||
}
|
||||
|
||||
public List<Joueur> getJoueurs() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user