Commit f22f53db authored by Killian LUCAS's avatar Killian LUCAS
Browse files

conception.adoc + modification planet pour la claireté

parent fe708122
......@@ -6,6 +6,8 @@
- Ajouter des méthodes dans Thrift pour ce faire
- Transformer les void de l'interface Game en Response
== Game
[plantuml]
....
class Room{
......@@ -176,13 +178,15 @@ class Room{
class RoomFactory{
- {static} idCounter : AtomicInteger
- {static} createRoom(playerId : String) : Game
- {static} createRoom(playerId : String) : Room
}
....
== Game
=== Action
=== Item
==== Action
.Package action
[plantuml]
....
......@@ -191,9 +195,10 @@ package action{
{abstract} getActionType() : ActionType
}
class ActionAssociateSurvivalCardsToPlaces{
- survivalCardIntegerMap : Map<SurvivalCard, Integer>
class ActionAssociateCardNamesToPlaces{
- cardNamePlaceMap : Map<CardName, Place>
+ getActionType() : ActionType
+ getCardNamePlaceMap : Map<CardName, Place>
}
class ActionChooseCard{
......@@ -203,8 +208,8 @@ package action{
}
class ActionChoosePlace{
- idPlaces : Integer[*]
+ getIdPlaces() : Integer[*]
- places : Place[*]
+ getPlaces() : Place[*]
+ getActionType() : ActionType
}
......@@ -214,27 +219,36 @@ package action{
+ getActionType() : ActionType
}
class ActionContainer{
- actions : Action[*]
+ add(action : Action) : Boolean
+ add(actions : Action[*]) : Boolean
+ doAction(action : Action) : Boolean
+ doAction(actions : Action[*]) : Boolean
+ isEmpty() : Boolean
}
class ActionMoveJeton{
- jeton : JetonType
- jeton : JetonSymbol
- place : Place
+ getJetonType() : JetonType
+ getJeton() : JetonSymbol
+ getPlace : Place
+ getActionType() : ActionType
}
class ActionMovePlayer{
- integer idPlayer
- Place place
+ integer getIdPlayer()
+ Place getPlace
+ getActionType()
- idPlayer : Integer
- place : Place
+ getIdPlayer() : Integer
+ getPlace() : Place
+ getActionType() : ActionType
}
class ActionSwapJeton{
- jeton1 : JetonType
- jeton2 : JetonType
+ getJeton1() : JetonType
+ getJeton2() : JetonType
- jeton1 : JetonSymbol
- jeton2 : JetonSymbol
+ getJeton1() : JetonSymbol
+ getJeton2() : JetonSymbol
+ getActionType() : ActionType
}
......@@ -253,17 +267,17 @@ package action{
SWAP_JETONS
MOVE_JETON
ASSOCIATE_SURVIVAL_CARDS_TO_PLACES
SHOW_CARD
}
class ActionContainer{
- actions : Action[*]
+ add(action : Action) : Boolean
+ add(actions : Action[*]) : Boolean
+ doAction(action : Action) : Boolean
+ doAction(actions : Action[*]) : Boolean
+ isEmpty() : Boolean
enum TPairType{
NUMBER
CARD
PLACE
JETON
PLAYER
}
Action <|-- ActionAssociateSurvivalCardsToPlaces
Action <|-- ActionChooseCard
Action <|-- ActionChoosePlace
......@@ -282,25 +296,52 @@ package action{
[plantuml]
....
package board{
enum BoardDistribution{
FRONT
BACK
}
class Board{
- boardDistribution : BoardDistribution
- boardColor : BoardColor
- score : Score
+ getScore() : Score
+ getBoardDistribution() : BoardDistribution
+ getBoardColor() : BoardColor
+ isArtemiaSquare() : Boolean
+ toString() : String
- initializeScore(playerNumber : Integer)
+ isFinish() : boolean
+ getScoreTraque() : Integer
+ getScoreCreature() : Integer
+ actualBestTeam() : PlayerTeam
+ winner() : PlayerTeam
- moveForwardTraque(delta : Integer)
- moveForwardTraque()
- moveBackTraque(delta : Integer)
- moveBackTraque()
- moveForwardCreature(delta : Integer)
- moveForwardCreature()
- moveBackCreature(delta : Integer)
- moveBackCreature()
}
enum BoardColor{
BLUE
RED
GREEN
YELLOW
}
enum BoardDistribution{
FRONT
BACK
}
class Score{
- scoreTraque : Integer
- scoreCreature : Integer
- winner : PlayerTeam
+ getScoreTraque() : Integer
+ getScoreCreature() : Integer
+ isFinish() : Boolean
+ actualBestTeam() : PlayerTeam
+ winner() : PlayerTeam
+ scoreCreatureGreaterThanBase() : Boolean
+ scoreTraqueGreaterThanBase() : Boolean
+ moveForwardTraque(delta : Integer)
......@@ -311,15 +352,6 @@ package board{
+ toString() : String
}
class Board{
- boardDistribution : BoardDistribution
- boardColor : BoardColor
+ getScore() : Score
+ getBoardDistribution() : BoardDistribution
+ getBoardColor() : BoardColor
+ initializeScore(integer playerNumber)
+ isArtemiaSquare() : Boolean
}
Board "1" o-- "1 score" Score
}
......@@ -347,7 +379,21 @@ package card{
+ equals(o : Object) : Boolean
+ {abstract} getType() : CardType
+ toString() : String
+ hashCode() : int
+ hashCode() : Integer
}
enum BoardDistribution{
ANTRE, JUNGLE, RIVIERE, PLAGE, ROVER, MARAIS, ABRI, EPAVE, SOURCE, ARTEFACT,
NEXUS, OASIS, FJORD, DOME, LABYRINTHE, MANGROVE, ARCHIPEL, POLE, FUNGI, PORTAIL,
ACHARNEMENT, ANGOISSE, ANTICIPATION, CATACLYSME, CHAMP_DE_FORCE, CLONE, DEPLOIEMENT, DESESPOIR, DETOUR, DOMINATION, EFFROI,
EMPRISE, EPIDEMIE, FAILLE_TEMPORELLE, FLASHBACK, GARGANTUA, HARCELEMENT, HURLEMENTS, INERTIE, INTERFERENCES, INTUITION,
MAGNETISME, MIRAGE, MUTATION, PSYCHOSE, REMINISCENCE, REPERAGE, SABLES_MOUVANTS, SOIF_DE_SANG, STASE, TELEPATHIE,
TORNADE, TOXINE, UBIQUITE, VIRUS, ZONE_INTERDITE,
ADRENALINE, ALERTE, AMPLIFICATEUR, BROUILLAGE, CAVALE, DETECTEUR, DRONE, ENTRAVE, EQUIPEMENT, ESQUIVE,
FAUSSE_PISTE, HOLOGRAMME, LEURRE, MIMETISME, NAVETTE, PLANQUES, PORTAIL_SURVIVAL, RALLIEMENT, REFUGE, REGENERATION,
RESISTANCE, RETRAITE, RIPOSTE, SACRIFICE, SECOND_SOUFFLE, SIXIEME_SENS, SYSTEME_D, TENACITE, VACCIN, VOLTE_FACE,
VORTEX
}
class PlaceCard {
......@@ -362,7 +408,9 @@ package card{
abstract class PlayerCard {
# phase : Phase
# phaseToApply : Phase
+ getPhase() : Phase
+ getPhaseToApply() : Phase
}
class SurvivalCard {
......@@ -373,7 +421,7 @@ package card{
- symbols : List<JetonSymbol>
+ getType() : CardType
+ getJetons() : List<JetonSymbol>
+ containsSymbol(type : JetonSymbole) : boolean
+ containsSymbol(type : JetonSymbol) : boolean
}
......@@ -385,7 +433,7 @@ package card{
....
=== Hand
=== Hand TODO
.Package hand
[plantuml]
....
......@@ -447,28 +495,29 @@ package hand{
....
package jeton{
enum JetonType{
CIBLE
ARTEMIA
CREATURE
}
abstract class Jeton{
# powers : PowerContainer
+ getPowers() : PowerContainer
+ {abstract} getType() : JetonType
# powers : PowerType
+ getPowers() : PowerType
+ {abstract} getType() : JetonSymbol
}
class JetonArtemia{
+ getType() : JetonType
+ getType() : JetonSymbol
}
class JetonCreature{
+ getType() : JetonType
+ getType() : JetonSymbol
}
class JetonCible{
+ getType() : JetonType
+ getType() : JetonSymbol
}
enum JetonSymbol{
CIBLE
ARTEMIA
CREATURE
}
class PlacedJeton{
......@@ -495,9 +544,14 @@ package pioche{
- cards : T[*]
- trash : T[*]
- random : Random
+ mix()
- mix()
+ draw() : T
+ draw(number : Integer) : T[*]
- throwAway(cards : T[*])
- throwAway(card : T)
+ getLastTrashCards(number : Integer) : T[*]
+ getTrash() : T[*]
+ getCards() : T[*]
}
}
....
......@@ -507,7 +561,17 @@ package pioche{
[plantuml]
....
package planet{
class BeaconPawn{
- state : Integer
- nextState()
+ isActive() : Boolean
+ getType() : PawnType
+ maxMovesInOneRound() : Integer
}
enum PawnType{
SHIELD
BEACON
}
enum Place{
PLACE_ONE
PLACE_TWO
......@@ -520,65 +584,110 @@ package planet{
PLACE_NINE
PLACE_TEN
}
abstract class PlanetPawn{
# powers : PowerContainer
+ getPowers() : PowerContainer
+ {abstract} nextState()
+ {abstract} isActive() : Boolean
}
class BeaconPawn{
- state : Boolean
+ nextState()
+ isActive() : Boolean
}
class ShieldPawn{
- location : Integer
+ nextState()
+ isActive() : Boolean
}
class PlaceDistribution{
- mapCardNumberToPlaceCard : Map<Integer, PlaceCard>
- mapPlaceCardToPlace : Map<PlaceCard, Place>
- placeIsHidden : Map<Place, Boolean>
- initialization()
- initialization(placeCards : PlaceCard[*])
- initializePlaceCardsVisibility()
- initializePlaces
- initializePlaces()
+ createPawn() : PlanetPawn
+ isValidPlacesForJeton(adjacentPlaces Place[*]) : boolean
+ placeToNumber(place : Place) : Integer
+ numberToPlace(number : Integer) : Place
+ isAdjacentPlaces(place1 : Integer, place2 : Integer) : Boolean
+ isAdjacentPlaces(place1 : Place, place2 : Place) : Boolean
+ isValidPlacesForJeton(adjacentPlacesCard : PlaceCard[*]) : Boolean
+ placeCardToPlace(card : PlaceCard) : Place
+ placeToPlaceCard(card : PlaceCard) : PlaceCard
+ useCardLabyrinthe() : Boolean
+ useCardDome() : Boolean
+ useCardPole() : Boolean
+ getPlaceCardsInInterval(a : Integer, b : Integer) : PlaceCard[*]
+ getPlaceCards() : PlaceCard[*]
+ isHiddenCards() : boolean
+ getHiddenCards() : PlaceCard[*]
+ getHiddenPlaces() : Place[*]
- revealPlace(place : Place)
- revealPlace(placeCard : PlaceCard)
+ isRevealedPlace(place : Place)
+ isRevealedPlace(placeCard : PlaceCard)
}
class Planet{
- mapPlaceToJetons : Map<Place, List<Jeton>>
- blockedPlaces : Map<Integer, Boolean>
- pawnMoveInRound : Boolean
- mapPlaceToJetons : Map<Place, Jeton[*]>
- blockedPlaces : Map<Place, Boolean>
- placeSurvivalCardMap : Map<Place, SurvivalCard>
- numberMovesAllowInRound : Integer
- placeDistribution : PlaceDistribution
- planetPawn : PlanetPawn
- epaveUsedInTheRound : Boolean
+ getPlaceDistribution() : PlaceDistribution
+ clear()
+ placeJeton(jeton : Jeton, adjacentPlacesCard : PlaceCard[*])
+ blockPlaces(cardsNumber : Integer[*])
+ reset()
+ placeJeton(placedJeton : PlacedJeton)
+ getPlacesWhereJetonIs(symbol : JetonSymbol) : Place[*]
+ getPlaceCardsWhereJetonIs(symbol : JetonSymbol) : PlaceCard[*]
- removeJeton(symbol : JetonSymbol)
- blockPlaces(places : Place[*])
- blockPlaces(place : Place)
- blockPlaces(placeCard : PlaceCard)
+ isBlockedPlace(card : PlaceCard) : Boolean
+ isJetonOnPlace(place : Place) : Boolean
+ isJetonOnPlace(card : PlaceCard) : Boolean
+ findJetonsOnCard(card : PlaceCard) : Jeton[*]
+ findJetonsSymbolsOnCard(placeCard : PlaceCard) : JetonSymbol[*]
+ isJetonSymbolOnPlaceCard(symbol : JetonSymbol,placeCard : PlaceCard) : boolean
+ getPlanetPawn() : PlanetPawn
+ canMovePlanetPawn() : Boolean
+ movePlanetPawn() : Boolean
- forceMovePlanetPawn()
- moveBackPlanetPawn()
- resetPawn()
- placesWhereJetonCreatureIs() : PlaceCard[*]
- getPlaceCardsInInterval(a : Integer, b : Integer) : PlaceCard[*]
+ planetPawnIsActive() : Boolean
+ getPlanetPawnPowers() : PowerContainer
+ getPlanetPawnType() : PawnType
+ canUseEpavePower() : boolean
- setEpavePowerToUsed()
+ placeToPlaceCard(place : Place) : PlaceCard
+ isASurvivalCardOnPlace(place : Place) : boolean
+ isASurvivalCardOnPlace(placeCard : PlaceCard) : boolean
+ takeSurvivalCardOnPlace(place : Place) : SurvivalCard
+ takeSurvivalCardOnPlace(placeCard : PlaceCard) : SurvivalCard
- putSurvivalCardOnPlace(pair : Pair<Place, SurvivalCard>)
- putSurvivalCardOnPlace(pair : (Pair<Place, SurvivalCard>)[*])
+ placeToNumber(place : Place) : Integer
+ numberToPlace(number : Integer) : Place
+ isAdjacentPlaces(place1 : Integer, place2 : Integer) : boolean
+ isAdjacentPlaces(placeCard : PlaceCard, place : Place) : boolean
+ isAdjacentPlaces(placeCard1 : PlaceCard, placeCard1 : PlaceCard) : boolean
+ isAdjacentPlaces(place1 : Place, place2 : Place) : boolean
+ isHiddenCards() : boolean
+ getHiddenCards() : PlaceCard[*]
+ getHiddenPlaces() : Place[*]
- revealPlace(place : Place)
- revealPlace(placeCard : PlaceCard)
+ isRevealedPlace(place : Place): boolean
+ isRevealedPlace(placeCard : PlaceCard): boolean
- swapJeton(symbol1 : JetonSymbol, symbol2 : JetonSymbol)
+ createJeton(symbol : JetonSymbol) : Jeton
}
abstract class PlanetPawn{
# powers : PowerContainer
+ getPowers() : PowerContainer
+ {abstract} nextState()
+ {abstract} isActive() : Boolean
}
class ShieldPawn{
- location : Integer
+ nextState()
+ isActive() : Boolean
}
Planet "1" -- "1 placeDistribution" PlaceDistribution
Planet "1" -- "1 planetPawn" PlanetPawn
PlanetPawn <|-- ShieldPawn
......
......@@ -151,8 +151,8 @@ public class Planet {
}
}
public List<JetonSymbol> findJetonsSymbolsOnCard(PlaceCard card){
return findJetonsOnCard(card).stream().map(Jeton::getType).collect(Collectors.toList());
public List<JetonSymbol> findJetonsSymbolsOnCard(PlaceCard placeCard){
return findJetonsOnCard(placeCard).stream().map(Jeton::getType).collect(Collectors.toList());
}
public boolean isJetonSymbolOnPlaceCard(JetonSymbol symbol, PlaceCard placeCard) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment