ZIRTR0X 3 years ago
commit 9f4f07dbd0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -38,7 +38,8 @@ public class MapController implements Initializable {
private final Image w = new Image("/image/terrain/chemin.png");
private final Image x = new Image("/image/terrain/multiarbre1.png");
private final Image y = new Image("/image/terrain/multiarbre2.png");
private final Image z = new Image("/image/terrain/pierre.png");
private final Image z1 = new Image("/image/terrain/bonus.png");
private final Image z2 = new Image("/image/terrain/malus" + ".png");
private final Image aa = new Image("/image/terrain/pierre2.png");
private final Image ab = new Image("/image/terrain/pierre1.png");
private final Image ac = new Image("/image/terrain/tombe1.png");
@ -201,8 +202,14 @@ public class MapController implements Initializable {
for (int x = 0 ; x < grid[y].length ; x++) {
if(grid[y][x] != b) continue;
for(Case c : array) {
if (c.getCoordY() == y && c.getCoordX() == x && (c.isBonus() || c.isMalus())) {
ImageView imageView = new ImageView(z);
if (c.getCoordY() == y && c.getCoordX() == x && c.isBonus()) {
ImageView imageView = new ImageView(z1);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);
}
else if(c.getCoordY() == y && c.getCoordX() == x && c.isMalus()){
ImageView imageView = new ImageView(z2);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);
@ -317,8 +324,14 @@ public class MapController implements Initializable {
for (int x = 0 ; x < grid[y].length ; x++) {
if(grid[y][x] != b) continue;
for(Case c : array) {
if (c.getCoordY() == y && c.getCoordX() == x && (c.isBonus() || c.isMalus())) {
ImageView imageView = new ImageView(z);
if (c.getCoordY() == y && c.getCoordX() == x && c.isBonus()) {
ImageView imageView = new ImageView(z1);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);
}
else if(c.getCoordY() == y && c.getCoordX() == x && c.isMalus()){
ImageView imageView = new ImageView(z2);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);
@ -433,8 +446,14 @@ public class MapController implements Initializable {
for (int x = 0 ; x < grid[y].length ; x++) {
if(grid[y][x] != b) continue;
for(Case c : array) {
if (c.getCoordY() == y && c.getCoordX() == x && (c.isBonus() || c.isMalus())) {
ImageView imageView = new ImageView(z);
if (c.getCoordY() == y && c.getCoordX() == x && c.isBonus()) {
ImageView imageView = new ImageView(z1);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);
}
else if(c.getCoordY() == y && c.getCoordX() == x && c.isMalus()){
ImageView imageView = new ImageView(z2);
imageView.setFitWidth(tileSize);
imageView.setFitHeight(tileSize);
gridPane.add(imageView, x, y);

@ -1,9 +0,0 @@
package model;
public class BonusCase extends Case {
public BonusCase(int idCase, int coordX, int coordY, boolean isStart, boolean isBonus, boolean isMalus, boolean isEnd, Map map, Bonus bonus) {
super(idCase, coordX, coordY, isStart, isBonus, isMalus, isEnd, map);
Bonus bonus1 = bonus.randomGet();
}
}

@ -10,10 +10,9 @@ public class DataTable implements Serializable {
private static int id = 0;
private int gameId;
private String playerName;
private int Maxscore;
private int rounds;
private double timeElapsed;
private double timer;
public DataTable(int levelNumber) {
id++;
@ -24,8 +23,7 @@ public class DataTable implements Serializable {
id++;
this.gameId = id;
this.Maxscore = 0;
this.timeElapsed = 0;
this.playerName = "";
this.timer = 0;
this.rounds = 0;
//this.score=score; Calcul du score avec la difficulté !
@ -34,8 +32,7 @@ public class DataTable implements Serializable {
//Function update
public void update(int score, String name, double time, int rounds) {
this.Maxscore = score;
this.playerName = name;
this.timeElapsed = time;
this.timer = time;
this.rounds = rounds;
}
@ -49,8 +46,8 @@ public class DataTable implements Serializable {
}
public double getTimeElapsed() {
System.out.println(this.timeElapsed);
return this.timeElapsed;
System.out.println(this.timer);
return this.timer;
}
public int maxScore() {
@ -58,11 +55,6 @@ public class DataTable implements Serializable {
return this.Maxscore;
}
public String playerName() {
System.out.println(this.playerName);
return this.playerName;
}
public int getRounds(){
System.out.println(this.rounds);
return this.rounds;
@ -72,8 +64,4 @@ public class DataTable implements Serializable {
System.out.println(this.gameId);
return this.gameId;
}
public String toString() {
return this.playerName + " : " + this.Maxscore;
}
}

@ -1,10 +0,0 @@
package model;
public class MalusCase extends Case{
public MalusCase(int idCase, int coordX, int coordY, boolean isStart, boolean isBonus, boolean isMalus, boolean isEnd, Map map, Malus malus) {
super(idCase, coordX, coordY, isStart, isBonus, isMalus, isEnd, map);
Malus malus1 = malus.randomGet();
}
}
Loading…
Cancel
Save