Compare commits
No commits in common. "master" and "rollingDice" have entirely different histories.
master
...
rollingDic
3
.gitignore
vendored
@ -41,6 +41,3 @@ local.properties
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
/.clover/
|
||||
|
||||
#others
|
||||
*.iml
|
8
.idea/.gitignore
generated
vendored
@ -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/
|
16
.idea/libraries/lib.xml
generated
@ -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>
|
10
.idea/libraries/lib1.xml
generated
@ -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
@ -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
@ -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
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -19,13 +19,7 @@ Pour gagner, les Hunters et Shadow doivent éliminer tous les personnages du cam
|
||||
|
||||
## Comment l'utiliser
|
||||
|
||||
Dans un premier temps, vous pouvez télécharger la dernière version de notre application en utilisant la commande :
|
||||
|
||||
```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.
|
||||
Vous trouverez la documentation pour utliser notre application [ici].
|
||||
|
||||
## Auteurs
|
||||
|
||||
|
12
git2.iml
@ -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>
|
@ -1,3 +0,0 @@
|
||||
javafx.version=11.0.2
|
||||
javafx.runtime.version=11.0.2+1
|
||||
javafx.runtime.build=1
|
Before Width: | Height: | Size: 560 KiB |
Before Width: | Height: | Size: 541 KiB |
Before Width: | Height: | Size: 564 KiB |
Before Width: | Height: | Size: 629 KiB |
Before Width: | Height: | Size: 643 KiB |
Before Width: | Height: | Size: 546 KiB |
Before Width: | Height: | Size: 562 KiB |
Before Width: | Height: | Size: 555 KiB |
Before Width: | Height: | Size: 598 KiB |
Before Width: | Height: | Size: 585 KiB |
Before Width: | Height: | Size: 585 KiB |
Before Width: | Height: | Size: 549 KiB |
Before Width: | Height: | Size: 585 KiB |
Before Width: | Height: | Size: 595 KiB |
Before Width: | Height: | Size: 570 KiB |
Before Width: | Height: | Size: 575 KiB |
Before Width: | Height: | Size: 578 KiB |
Before Width: | Height: | Size: 583 KiB |
Before Width: | Height: | Size: 638 KiB |
Before Width: | Height: | Size: 592 KiB |
Before Width: | Height: | Size: 645 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 537 KiB |
Before Width: | Height: | Size: 577 KiB |
Before Width: | Height: | Size: 577 KiB |
Before Width: | Height: | Size: 591 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 587 KiB |
Before Width: | Height: | Size: 666 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 600 KiB |
Before Width: | Height: | Size: 585 KiB |
Before Width: | Height: | Size: 564 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 600 KiB |
Before Width: | Height: | Size: 658 KiB |
Before Width: | Height: | Size: 586 KiB |
Before Width: | Height: | Size: 579 KiB |
Before Width: | Height: | Size: 652 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 579 KiB |
Before Width: | Height: | Size: 582 KiB |
Before Width: | Height: | Size: 593 KiB |
Before Width: | Height: | Size: 556 KiB |
Before Width: | Height: | Size: 585 KiB |
Before Width: | Height: | Size: 653 KiB |
Before Width: | Height: | Size: 577 KiB |
Before Width: | Height: | Size: 629 KiB |
Before Width: | Height: | Size: 584 KiB |
Before Width: | Height: | Size: 632 KiB |
Before Width: | Height: | Size: 645 KiB |
Before Width: | Height: | Size: 586 KiB |
Before Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 561 KiB |
Before Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 661 KiB |
Before Width: | Height: | Size: 619 KiB |
Before Width: | Height: | Size: 671 KiB |
Before Width: | Height: | Size: 649 KiB |
Before Width: | Height: | Size: 635 KiB |
Before Width: | Height: | Size: 611 KiB |
Before Width: | Height: | Size: 560 KiB |
Before Width: | Height: | Size: 554 KiB |
Before Width: | Height: | Size: 541 KiB |
BIN
shDBlatest.sql
@ -1,15 +1,9 @@
|
||||
package carte;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import main.Joueur;
|
||||
|
||||
public abstract class Carte implements Serializable {
|
||||
public abstract class Carte {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -3227553705226975570L;
|
||||
private String nom;
|
||||
private String description;
|
||||
|
||||
|
@ -1,32 +1,16 @@
|
||||
package carte;
|
||||
|
||||
import main.Joueur;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import condition.Condition;
|
||||
|
||||
public abstract class CarteCondition extends CarteEffet implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 903022795821166067L;
|
||||
private Condition condition;
|
||||
|
||||
public CarteCondition() {
|
||||
super("","");
|
||||
this.condition = new Condition();
|
||||
}
|
||||
|
||||
public abstract class CarteCondition extends CarteEffet{
|
||||
|
||||
public CarteCondition(String nom, String description) {
|
||||
super(nom, description);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private Condition condition;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -1,27 +1,17 @@
|
||||
package carte;
|
||||
|
||||
import main.Joueur;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
public CarteEffet(String nom, String description) {
|
||||
super(nom, description);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @param j Appel la méthode utiliser de effet sur le joueur j
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -13,18 +13,12 @@ public class CarteLieu extends CarteEffet{
|
||||
private Point coordinates;
|
||||
private CarteLieu voisin;
|
||||
|
||||
public CarteLieu(Point point) {
|
||||
this("","",point);
|
||||
}
|
||||
|
||||
public CarteLieu(String nom, String description, Point p) {
|
||||
super(nom, description);
|
||||
this.coordinates = p;
|
||||
this.listeJoueurs = new ArrayList<Joueur>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @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) {
|
||||
this.voisin = cl;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
@ -2,28 +2,17 @@ package carte;
|
||||
|
||||
import java.awt.Point;
|
||||
|
||||
import carte.CartePiochable.Type;
|
||||
import main.Joueur;
|
||||
import main.Pioche;
|
||||
import main.Type;
|
||||
|
||||
public class CarteLieuType extends CarteLieu{
|
||||
public class CarteLieuType<T extends Type> extends CarteLieu{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -497959392470353155L;
|
||||
private Pioche pioche;
|
||||
private CartePiochable.Type type;
|
||||
private Pioche<T> pioche;
|
||||
|
||||
|
||||
public CarteLieuType(Type type, Point point) {
|
||||
super("","",point);
|
||||
this.setType(type);
|
||||
}
|
||||
|
||||
public CarteLieuType(CartePiochable.Type type,String name, String description ,Point coordinates,Pioche pioche) {
|
||||
public CarteLieuType(String name, String description ,Point coordinates,Pioche<T> pioche) {
|
||||
super(name , description , coordinates);
|
||||
this.setType(type);
|
||||
this.pioche = pioche;
|
||||
}
|
||||
|
||||
@ -31,20 +20,10 @@ public class CarteLieuType extends CarteLieu{
|
||||
* @param j Appel la méthode utiliser de effet sur le joueur j
|
||||
*/
|
||||
public void utiliser(Joueur j) {
|
||||
System.out.println(pioche);
|
||||
CartePiochable carte = pioche.piocher(j);
|
||||
|
||||
CartePiochable<?> carte = pioche.piocher();
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,55 +1,21 @@
|
||||
package carte;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import condition.Condition;
|
||||
import effet.Effet;
|
||||
import main.GestionnaireJeu;
|
||||
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);
|
||||
this.type = t;
|
||||
}
|
||||
|
||||
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());
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/*
|
||||
* @param j Appel la méthode utiliser de effet sur le joueur j
|
||||
*/
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
@ -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);
|
||||
}
|
17
src/carte/EquipementStat.java
Normal 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);
|
||||
}
|
||||
}
|