Commit 1e25d303 authored by dkonam's avatar dkonam

maj coordinate

parent e39ed57a
......@@ -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;
}
......
......@@ -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;
}
......
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