Commit ea067936 authored by Peining Li's avatar Peining Li
Browse files

Merge branch 'IHM-Main/secondinteg' into 'ihm-main/develop'

Ihm main/secondinteg

See merge request !183
parents 1015757e 19336f5e
......@@ -151,6 +151,10 @@ public class GameListController extends AbstractController{
modeColumn.setCellValueFactory(new PropertyValueFactory<>("type"));
TableColumn aiColumn = new TableColumn("AI");
aiColumn.setCellValueFactory(new PropertyValueFactory<>("computerMode"));
TableColumn chatColumn = new TableColumn("CHAT");
chatColumn.setCellValueFactory(new PropertyValueFactory<>("spectatorChat"));
......@@ -179,7 +183,7 @@ public class GameListController extends AbstractController{
gameList = new TableView<>();
gameList.getColumns().addAll(nameColumn, creatorColumn, modeColumn, chatColumn, playerNumberColumn);
gameList.getColumns().addAll(nameColumn, creatorColumn, modeColumn, aiColumn, chatColumn, playerNumberColumn);
......@@ -216,8 +220,12 @@ public class GameListController extends AbstractController{
private void joinSelectedGame(ActionEvent event){
if(selectedGame != null){
getFacade().iDataIHMMain.gameConnectionRequestGame(selectedGame.getId(), "player");
getFacade().iDataIHMMain.gameConnectionRequestGame(selectedGame.getId(), "player");
showSuccessPopup("You can't join a party VS AI","Click on watch if you want to watch it","Create a game by yourself if you want to play VS AI");
showSuccessPopup("Please select a game","Please select a game to join","Create a game or Find a friend and add his ip if you don't have any game in list");
......@@ -231,7 +239,6 @@ public class GameListController extends AbstractController{
private void watchSelectedGame(ActionEvent event){
if(selectedGame != null){
System.out.println("ihm main watch request");
getFacade().iDataIHMMain.gameConnectionRequestGame(selectedGame.getId(), "spectator");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment