Added documentation and rewording
This commit is contained in:
parent
dea959919c
commit
04615814a9
@ -1,7 +1,14 @@
|
||||
# API PUBLIQUE - Conception de jeu
|
||||
|
||||
## Documentation
|
||||
|
||||
# Journal des modifications -
|
||||
### Plateau :
|
||||
|
||||
## Journal des modifications
|
||||
|
||||
### 09/10/2024 - 9h10 :
|
||||
Création de l'API publique
|
||||
|
||||
### 09/10/2024 - 9h50 :
|
||||
- Rewording des packages
|
||||
- Ajout de la documentation
|
||||
|
@ -1,11 +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="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,14 +0,0 @@
|
||||
package fr.iut_fbleau.but3GameBody.entity;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public interface Plateau {
|
||||
|
||||
Player getPlayer();
|
||||
boolean isFinished();
|
||||
Result getResult();
|
||||
Iterator<Ply> givePlies();
|
||||
void doo(Ply ply);
|
||||
void undo(Ply ply);
|
||||
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package fr.iut_fbleau.but3GameBody.entity;
|
||||
|
||||
public abstract class Ply {
|
||||
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package fr.iut_fbleau.but3GameBody.entity;
|
||||
|
||||
public class Result {
|
||||
|
||||
public final static int GAGNE = 1;
|
||||
public final static int EGALITE = 0;
|
||||
public final static int PERDU = -1;
|
||||
|
||||
}
|
57
src/fr/iut_fbleau/raw_api_body/entity/Plateau.java
Normal file
57
src/fr/iut_fbleau/raw_api_body/entity/Plateau.java
Normal file
@ -0,0 +1,57 @@
|
||||
package fr.iut_fbleau.raw_api_body.entity;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
* The interface Plateau.
|
||||
*/
|
||||
public interface Plateau {
|
||||
|
||||
/**
|
||||
* Return the current player
|
||||
*
|
||||
* @return the player
|
||||
*/
|
||||
Player getPlayer();
|
||||
|
||||
/**
|
||||
* Return the game status
|
||||
* - true if party is finished
|
||||
* - false else
|
||||
*
|
||||
* @return the boolean
|
||||
*/
|
||||
boolean isFinished();
|
||||
|
||||
/**
|
||||
* Return the result of a try
|
||||
* - if the move is winnable : 1
|
||||
* - if the move is a draw : 0
|
||||
* - if its a defeat move : -1
|
||||
*
|
||||
* @return the result
|
||||
*/
|
||||
Result getResult();
|
||||
|
||||
/**
|
||||
* Gives previous played plies
|
||||
*
|
||||
* @return the iterator
|
||||
*/
|
||||
Iterator<Ply> givePlies();
|
||||
|
||||
/**
|
||||
* Play a ply
|
||||
*
|
||||
* @param ply the ply
|
||||
*/
|
||||
void doo(Ply ply);
|
||||
|
||||
/**
|
||||
* Removed a ply.
|
||||
*
|
||||
* @param ply the ply
|
||||
*/
|
||||
void undo(Ply ply);
|
||||
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
package fr.iut_fbleau.but3GameBody.entity;
|
||||
package fr.iut_fbleau.raw_api_body.entity;
|
||||
|
||||
public enum Player {
|
||||
|
||||
JOUEUR1,
|
||||
JOUEUR2
|
||||
|
||||
}
|
6
src/fr/iut_fbleau/raw_api_body/entity/Ply.java
Normal file
6
src/fr/iut_fbleau/raw_api_body/entity/Ply.java
Normal file
@ -0,0 +1,6 @@
|
||||
package fr.iut_fbleau.raw_api_body.entity;
|
||||
|
||||
public abstract class Ply {
|
||||
|
||||
|
||||
}
|
21
src/fr/iut_fbleau/raw_api_body/entity/Result.java
Normal file
21
src/fr/iut_fbleau/raw_api_body/entity/Result.java
Normal file
@ -0,0 +1,21 @@
|
||||
package fr.iut_fbleau.raw_api_body.entity;
|
||||
|
||||
/**
|
||||
* The type Result.
|
||||
*/
|
||||
public class Result {
|
||||
|
||||
/**
|
||||
* The constant GAGNE.
|
||||
*/
|
||||
public final static int GAGNE = 1;
|
||||
/**
|
||||
* The constant EGALITE.
|
||||
*/
|
||||
public final static int EGALITE = 0;
|
||||
/**
|
||||
* The constant PERDU.
|
||||
*/
|
||||
public final static int PERDU = -1;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user