Compare commits

..

No commits in common. "master" and "rollingDice" have entirely different histories.

315 changed files with 3740 additions and 11099 deletions

3
.gitignore vendored
View File

@ -41,6 +41,3 @@ local.properties
# Locally stored "Eclipse launch configurations" # Locally stored "Eclipse launch configurations"
*.launch *.launch
/.clover/ /.clover/
#others
*.iml

8
.idea/.gitignore generated vendored
View File

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -1,16 +0,0 @@
<component name="libraryTable">
<library name="lib">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/javafx-swt.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.controls.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.web.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.base.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.fxml.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.media.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.graphics.jar!/" />
<root url="jar://$PROJECT_DIR$/lib/javafx.swing.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

View File

@ -1,10 +0,0 @@
<component name="libraryTable">
<library name="lib1">
<CLASSES>
<root url="file://$PROJECT_DIR$/javafx-sdk-11.0.2/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
<jarDirectory url="file://$PROJECT_DIR$/javafx-sdk-11.0.2/lib" recursive="false" />
</library>
</component>

9
.idea/misc.xml generated
View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_13" default="false" project-jdk-name="14" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated
View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/git2.iml" filepath="$PROJECT_DIR$/git2.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated
View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -19,13 +19,7 @@ Pour gagner, les Hunters et Shadow doivent éliminer tous les personnages du cam
## Comment l'utiliser ## Comment l'utiliser
Dans un premier temps, vous pouvez télécharger la dernière version de notre application en utilisant la commande : Vous trouverez la documentation pour utliser notre application [ici].
```git clone https://github.com/PTE-SH/ShadowHunterGame.git```
Puis, il faut executez le ``ShadowHunterGame.exe`` pour pouvoir y jouer.
Ce projet repose sur le [Java JDK 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html) pour pouvoir fonctionner.
## Auteurs ## Auteurs

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib1" level="project" />
</component>
</module>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
javafx.version=11.0.2
javafx.runtime.version=11.0.2+1
javafx.runtime.build=1

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 570 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 583 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 638 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 584 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 561 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 649 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 KiB

Binary file not shown.

View File

@ -1,15 +1,9 @@
package carte; package carte;
import java.io.Serializable;
import main.Joueur; import main.Joueur;
public abstract class Carte implements Serializable { public abstract class Carte {
/**
*
*/
private static final long serialVersionUID = -3227553705226975570L;
private String nom; private String nom;
private String description; private String description;

View File

@ -1,32 +1,16 @@
package carte; package carte;
import main.Joueur; import main.Joueur;
import java.io.Serializable;
import condition.Condition; import condition.Condition;
public abstract class CarteCondition extends CarteEffet implements Serializable{ public abstract class CarteCondition extends CarteEffet{
/**
*
*/
private static final long serialVersionUID = 903022795821166067L;
private Condition condition;
public CarteCondition() {
super("","");
this.condition = new Condition();
}
public CarteCondition(String nom, String description) { public CarteCondition(String nom, String description) {
super(nom, description); super(nom, description);
} }
private Condition condition;
/* /*

View File

@ -1,27 +1,17 @@
package carte; package carte;
import main.Joueur; import main.Joueur;
import java.io.Serializable;
import effet.Effet; import effet.Effet;
public abstract class CarteEffet extends Carte implements Serializable{ public abstract class CarteEffet extends Carte{
/**
*
*/
private static final long serialVersionUID = -5248405395465365805L;
private Effet effet; private Effet effet;
public CarteEffet(String nom, String description) { public CarteEffet(String nom, String description) {
super(nom, description); super(nom, description);
} }
/* /*
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */

View File

@ -1,29 +0,0 @@
package carte;
import effet.Effet;
import main.Joueur;
public abstract class CarteEquipement extends CartePiochable{
/**
*
*/
private static final long serialVersionUID = 7537771209935892801L;
public CarteEquipement(Type t, Effet effet) {
super(t, effet);
}
@Override
public void utiliser(Joueur j) {
if(!j.getEquipements().contains(this)) {
j.ajouterEquipement(this);
}
super.utiliser(j);
}
public abstract void reverse(Joueur j);
}

View File

@ -1,26 +0,0 @@
package carte;
import effet.Effet;
import main.Joueur;
public class CarteEquipementEffet extends CarteEquipement {
public CarteEquipementEffet(Type t, Effet effet) {
super(t, effet);
// TODO Auto-generated constructor stub
}
/**
*
*/
private static final long serialVersionUID = -7036514419711836673L;
@Override
public void reverse(Joueur j) {
// TODO Auto-generated method stub
}
}

View File

@ -1,35 +0,0 @@
package carte;
import condition.Condition;
import effet.Effet;
import effet.action.ActionAltererStatistiquesJoueur;
import main.Joueur;
public class CarteEquipementStat extends CarteEquipement{
public CarteEquipementStat(Type t, Effet effet) {
super(t, effet);
}
public CarteEquipementStat(Type t, Effet effet, Condition condition) {
super(t, effet);
this.setCondition(condition);
}
/**
*
*/
private static final long serialVersionUID = 1602387056611454284L;
@Override
public void reverse(Joueur j) {
ActionAltererStatistiquesJoueur action = ((ActionAltererStatistiquesJoueur) this.getEffet().getAction()).getReverseAction();
action.affecte(j, j);
}
}

View File

@ -13,18 +13,12 @@ public class CarteLieu extends CarteEffet{
private Point coordinates; private Point coordinates;
private CarteLieu voisin; private CarteLieu voisin;
public CarteLieu(Point point) {
this("","",point);
}
public CarteLieu(String nom, String description, Point p) { public CarteLieu(String nom, String description, Point p) {
super(nom, description); super(nom, description);
this.coordinates = p; this.coordinates = p;
this.listeJoueurs = new ArrayList<Joueur>(); this.listeJoueurs = new ArrayList<Joueur>();
} }
/* /*
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
@ -53,11 +47,6 @@ public class CarteLieu extends CarteEffet{
} }
} }
public CarteLieu getVoisin() {
return voisin;
}
public void setVoisin(CarteLieu cl) { public void setVoisin(CarteLieu cl) {
this.voisin = cl; this.voisin = cl;
} }

View File

@ -1,36 +0,0 @@
package carte;
import java.awt.Point;
import java.util.List;
import main.Joueur;
import main.Pioche;
public class CarteLieuMultiple extends CarteLieu{
/**
*
*/
private static final long serialVersionUID = -497959392470353155L;
private List<Pioche> pioches;
public CarteLieuMultiple(Point point) {
super("","",point);
}
/*
* @param j Appel la méthode utiliser de effet sur le joueur j
*/
public void utiliser(Joueur j) {
Pioche p = (Pioche) j.choisir(pioches, Pioche.class);
System.out.println(pioches+ " "+p);
System.out.println(p.getStack());
Carte c = p.piocher(j);
c.utiliser(j);
}
public void setPioches(List<Pioche> pioches) {
this.pioches = pioches;
}
}

View File

@ -2,49 +2,28 @@ package carte;
import java.awt.Point; import java.awt.Point;
import carte.CartePiochable.Type;
import main.Joueur; import main.Joueur;
import main.Pioche; import main.Pioche;
import main.Type;
public class CarteLieuType extends CarteLieu{ public class CarteLieuType<T extends Type> extends CarteLieu{
/** private Pioche<T> pioche;
*
*/
private static final long serialVersionUID = -497959392470353155L;
private Pioche pioche;
private CartePiochable.Type type;
public CarteLieuType(Type type, Point point) { public CarteLieuType(String name, String description ,Point coordinates,Pioche<T> pioche) {
super("","",point);
this.setType(type);
}
public CarteLieuType(CartePiochable.Type type,String name, String description ,Point coordinates,Pioche pioche) {
super(name , description , coordinates); super(name , description , coordinates);
this.setType(type);
this.pioche = pioche; this.pioche = pioche;
} }
/* /*
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
System.out.println(pioche);
CartePiochable carte = pioche.piocher(j); CartePiochable<?> carte = pioche.piocher();
carte.utiliser(j); carte.utiliser(j);
} }
public void setPioche(Pioche p) {
this.pioche = p;
}
public CartePiochable.Type getType() {
return type;
}
public void setType(CartePiochable.Type type) {
this.type = type;
}
} }

View File

@ -1,55 +1,21 @@
package carte; package carte;
import java.io.Serializable;
import condition.Condition;
import effet.Effet;
import main.GestionnaireJeu;
import main.Joueur; import main.Joueur;
import main.Type;
public class CartePiochable extends CarteCondition implements Serializable{ public class CartePiochable<T extends Type> extends CarteCondition{
private static final long serialVersionUID = 2391013233873750967L;
private Type type;
public enum Type{
LUMIERE,
TENEBRE,
VISION
}
public CartePiochable(Type t, String nom, String description) { public CartePiochable(String nom, String description) {
super(nom, description); super(nom, description);
this.type = t; // TODO Auto-generated constructor stub
} }
public CartePiochable(Type t, Effet e, Condition c) {
super();
this.type = t;
this.setEffet(e);
this.setCondition(c);
}
public CartePiochable(Type t, Effet effet) {
super();
this.type = t;
this.setEffet(effet);
this.setCondition(new Condition());
}
/* /*
* @param j Appel la méthode utiliser de effet sur le joueur j * @param j Appel la méthode utiliser de effet sur le joueur j
*/ */
@Override
public void utiliser(Joueur j) { public void utiliser(Joueur j) {
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
System.out.println("CartePiochable "+this + " Condition : "+this.getCondition()+" Effet : "+this.getEffet()+" Action : "+this.getEffet().getAction());
super.utiliser(j); super.utiliser(j);
} }
public Type getType() {
return type;
}
} }

View File

@ -1,44 +0,0 @@
package carte;
import java.io.Serializable;
import condition.Condition;
import effet.EffetChoisirCible;
import effet.action.Action;
import main.Contexte;
import main.GestionnaireJeu;
import main.Joueur;
public class CarteVision extends CartePiochable implements Serializable{
/**
*
*/
private static final long serialVersionUID = 903022795821166067L;
public CarteVision(Action a, Condition c) {
super(Type.VISION, "","");
this.setEffet(new EffetChoisirCible(a));
this.setCondition(c);
}
/*
* @param j le joueur utilisant son effet
*/
@Override
public void utiliser(Joueur j1) {
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
gj.piocher(j1,this);
Joueur j2 = j1.choisiParmisTous();
boolean M = j2.isMetamorph();
boolean Co = this.getCondition().isTrue(j2);
gj.recevoirCarteVision(j2,this);
boolean C = j2.choisir(Contexte.CHOISIR_VISION);
if((!(M) && Co) || (M && C)) {
this.getEffet().getAction().affecte(j1, j2);
}
}
}

23
src/carte/Equipement.java Normal file
View File

@ -0,0 +1,23 @@
package carte;
import main.Joueur;
import main.Type;
public abstract class Equipement extends CartePiochable<Type>{
public Equipement(String nom, String description) {
super(nom, description);
// TODO Auto-generated constructor stub
}
public void utiliser(Joueur j) {
if(!j.getEquipements().contains(this)) {
j.ajouterEquipement(this);
}
super.utiliser(j);
}
public abstract void reverse(Joueur j);
}

View File

@ -0,0 +1,17 @@
package carte;
import effet.action.ActionAltererStatistiquesJoueur;
import main.Joueur;
public class EquipementStat extends Equipement{
public EquipementStat(String nom, String description) {
super(nom, description);
}
@Override
public void reverse(Joueur j) {
ActionAltererStatistiquesJoueur action = ((ActionAltererStatistiquesJoueur) this.getEffet().getAction()).getReverseAction();
action.affecte(j, j);
}
}

Some files were not shown because too many files have changed in this diff Show More