Commit 1dafbb63 authored by dkonam's avatar dkonam

Merge branch 'Data/develop' into Data/ClassesOrga

parents d5eb6fca 2981c443
......@@ -83,4 +83,6 @@ local.properties
.cache-main
.scala_dependencies
.worksheet
/Battleship/target/
\ No newline at end of file
/Battleship/target/
nb-configuration.xml
......@@ -16,7 +16,7 @@
<organization>
<!-- Used as the 'Vendor' for JNLP generation -->
<name>Your Organisation</name>
<name>lo23</name>
</organization>
<build>
......@@ -104,5 +104,27 @@
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.2</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>lo23</sonar.organization>
<sonar.login>a7f86fb85267f6c368ef07d969a16ccf4be0db4b</sonar.login>
</properties>
</profile>
</profiles>
</project>
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain;
/**
*
* @author Linxuhao
*/
public class IHMMain {
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain;
/**
*
* @author Linxuhao
*/
public class IHMMainFacade {
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
/**
*
* @author Linxuhao
*/
public class CreateUserController {
@FXML
private Label label;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
/**
*
* @author Linxuhao
*/
public class LoginController {
@FXML
private Label label;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
/**
*
* @author Linxuhao
*/
public class MenuController {
@FXML
private Label label;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.utclo23.battleship.ihmmain.controller;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
/**
*
* @author Linxuhao
*/
public class PlayerProfileController {
@FXML
private Label label;
@FXML
private void handleButtonAction(ActionEvent event) {
System.out.println("You clicked me!");
label.setText("Hello World!");
}
}
......@@ -5,6 +5,7 @@
*/
package com.utclo23.data.facade;
import com.utclo23.data.structure.Coordinate;
import com.utclo23.data.structure.Event;
import com.utclo23.data.structure.Game;
import com.utclo23.data.structure.LightPublicUser;
......@@ -84,7 +85,7 @@ public class DataFacade implements IDataCom, IDataIHMTable, IDataIHMMain{
}
@Override
public boolean attack(Integer[] coords) {
public boolean attack(Coordinate coords) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
......
......@@ -16,7 +16,7 @@ import java.util.ArrayList;
public interface IDataIHMTable {
public ArrayList<Ship> getShips();
public void setShip(Ship ship);
public boolean attack(Integer[] coords);
public boolean attack(Coordinate coords);
public void leaveGame();
public ArrayList<Ship> getInitialBoardFromGameId(UID gameid);
public ArrayList<Event> getPreviousBoard();
......
......@@ -5,10 +5,16 @@
*/
package com.utclo23.data.structure;
import java.util.ArrayList;
/**
*
* @author Davy
*/
public class BelgianGame extends Game {
public class BelgianGame extends Game{
public BelgianGame(StatGame statGame, ArrayList<Player> players, ArrayList<LightPublicUser> spectators, ArrayList<Message> messages) {
super(statGame, players, spectators, messages);
}
}
......@@ -5,10 +5,17 @@
*/
package com.utclo23.data.structure;
import java.util.ArrayList;
/**
*
* @author Davy
*/
public class ClassicGame extends Game {
public class ClassicGame extends Game{
public ClassicGame(StatGame statGame, ArrayList<Player> players, ArrayList<LightPublicUser> spectators, ArrayList<Message> messages) {
super(statGame, players, spectators, messages);
}
}
......@@ -9,7 +9,7 @@ package com.utclo23.data.structure;
*
* @author lucillefargeau
*/
public class Coordonnees {
public class Coordinate {
private int x;
private int y;
......@@ -29,7 +29,7 @@ public class Coordonnees {
this.y = y;
}
public Coordonnees(int x, int y) {
public Coordinate(int x, int y) {
this.x = x;
this.y = y;
}
......
......@@ -23,7 +23,7 @@ public abstract class Game {
this.spectators = spectators;
this.messages = messages;
}
public ArrayList<LightPublicUser> getRecipients()
{
return null;
......@@ -38,5 +38,6 @@ public abstract class Game {
}
}
......@@ -11,14 +11,12 @@ package com.utclo23.data.structure;
*/
public class Mine extends Event {
private Player owner;
private Integer[] coord;
private Coordinate coord;
public Mine(Player owner, int x, int y)
public Mine(Player owner, Coordinate coord)
{
this.owner = owner;
this.coord = new Integer[2];
this.coord[0] = x;
this.coord[1] = y;
this.coord = coord;
}
......@@ -30,11 +28,11 @@ public class Mine extends Event {
this.owner = owner;
}
public Integer[] getCoord() {
public Coordinate getCoord() {
return coord;
}
public void setCoord(Integer[] coord) {
public void setCoord(Coordinate coord) {
this.coord = coord;
}
......
......@@ -14,9 +14,9 @@ import java.util.ArrayList;
public class Ship {
private ShipType type;
private Player owner;
private ArrayList<Integer[]> listCoord;
private ArrayList<Coordinate> listCoord;
public Ship(ShipType type, Player owner, ArrayList<Integer[]> listCoord) {
public Ship(ShipType type, Player owner, ArrayList<Coordinate> listCoord) {
this.type = type;
this.owner = owner;
this.listCoord = listCoord;
......@@ -38,11 +38,11 @@ public class Ship {
this.owner = owner;
}
public ArrayList<Integer[]> getListCoord() {
public ArrayList<Coordinate> getListCoord() {
return listCoord;
}
public void setListCoord(ArrayList<Integer[]> listCoord) {
public void setListCoord(ArrayList<Coordinate> listCoord) {
this.listCoord = listCoord;
}
......
......@@ -5,14 +5,17 @@
*/
package com.utclo23.data.structure;
import java.rmi.server.UID;
import java.util.ArrayList;
/**
*
* @author Davy
*/
public class StatGame {
private UID id;
private GameType type;
private String name;
......@@ -110,6 +113,6 @@ public class StatGame {
this.realGame = realGame;
this.gameAbandonned = gameAbandonned;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.CreateUserController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
</children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.LoginController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
</children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.MenuController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
</children>
</AnchorPane>
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="com.utclo23.battleship.ihmmain.controller.PlayerProfileController">
<children>
<Button layoutX="126" layoutY="90" text="Click Me!" onAction="#handleButtonAction" fx:id="button" />
<Label layoutX="126" layoutY="120" minHeight="16" minWidth="69" fx:id="label" />
</children>
</AnchorPane>
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