Skip to content
Snippets Groups Projects
Commit a4fc929a authored by Francois DEROUBAIX's avatar Francois DEROUBAIX
Browse files

update

parents c979be3b 361bd517
Branches
No related tags found
No related merge requests found
# Sprint 3
## Démo + Planification du sprint suivant
### Ce que nous avons fait durant ce sprint
Création des evenements et des déplacement
mise en place de l'affichage
### Ce que nous allons faire durant le prochain sprint
ajouté les unités et réalisé le système d'action
## Rétro
doc/sprint-3/radiateur.jpg

4.7 MiB

package main;
import units.Paysant;
public class Main {
private static Joueur winner;
private int actionPoint;
public static void main(String[] args) {
/*Region[][] regions = new Region[6][6];
for(int i = 0; i<regions.length; i++) {
for(int j = 0; j<regions[i].length; j++) {
regions[i][j] = new Region();
}
}*/
Plateau plateau = new Plateau();
int x = 11;
int y = 0;
plateau.getCase(x, y).setUnite(new Paysant(x, y, plateau, winner));
Affichage.affichage(plateau);
plateau.getCase(x, y).getUnite().move(Direction.HAUT);
System.out.println('\n');
Affichage.affichage(plateau);
<<<<<<< HEAD
=======
Menu();
}
public static void Menu () {
System.out.print("Bienvenu dans Game of Crown, vous êtes actuellement sur le Menu !");
>>>>>>> 6e6d8e1d075a8855972540815248afce1757f9e0
}
public Joueur Game (Joueur[] joueurs) {
boolean gameEnd = false;
while(gameEnd){
for (Joueur currentPlayer : joueurs) {
setActionPoint(currentPlayer);
Tour(currentPlayer, actionPoint);
}
}
return getWinner();
}
public void Tour (Joueur currentPlayer, int actionPoint) {
}
public void setActionPoint (int actionPoint) {
this.actionPoint = actionPoint;
}
public void setActionPoint (Joueur currentPlayer) {
this.actionPoint = currentPlayer.getArmee().size() + (currentPlayer.getRoyaume().size() * 3);
}
public int getActionPoint () {
return this.actionPoint;
}
public void setWinner (Joueur winner) {
this.winner = winner;
}
public Joueur getWinner () {
return this.winner;
}
}
package main;
import java.util.Scanner;
public class Scan {
public static int scan(int nbOfQuestion) {
Scanner sc = new Scanner(System.in);
int res = 0;
do {
try {
res = sc.nextInt();
} catch (Exception e) {
System.out.println("Veuillez entrer un nombre entre 1 et " + nbOfQuestion);
sc.nextLine();
}
} while (res <= 0 || res > nbOfQuestion);
sc.close();
return res;
}
}
......@@ -9,8 +9,9 @@ public class Combattre {
uniteDef.setArmor(uniteDef.getArmor()-uniteAttq.getDamage());
if (isAlive(uniteDef)) {
//TODO: peut tre mettre moins de dgat pour l'unit qui dfend
uniteAttq.setArmor(uniteAttq.getArmor()-uniteDef.getDamage());
//TODO: attention au archer !
isAlive(uniteAttq);
}
}
......
......@@ -8,7 +8,6 @@ import org.junit.Test;
import main.Case;
import main.Joueur;
import main.Plateau;
import main.Type;
public class CombatreTest {
Joueur j1 = new Joueur("bily");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment