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

conception.adoc améliorations

parent c2ad36d7
......@@ -17,9 +17,12 @@ class Room{
- room : Game
- isStart : Boolean
- isClose : Boolean
- requestManager : Thread
- play : Thread
- game : Game
- static(MAX_PLAYER : int)
- static(MIN_PLAYER : int)
+ getRoomId() : String
+ getPlayers() : Map<String, Integer>
+ getNumberPlayers() : AtomicInteger
+ isCreator(playerId : String) : Boolean
+ join(playerId : String) : Response
+ start(playerId : String, planet : Planet, board : Board, creatureNumber : Integer) : Response
......@@ -28,22 +31,26 @@ class Room{
}
package gamecontroller{
interface GameInteface{
interface GameInterface{
+ isFinish() : Boolean
+ apply(power : Power)
+ apply(powers : PowerContainer)
+ playerHasFinished(playerId : Integer, phase : Phase)
+ phaseIsFinish() : Boolean
+ playerPlayCard(playerId : Integer, card : Card)
+ playerPlayCard(playerId : Integer, cards : Card[*])
+ playerPlayCard(playerId : Integer, card : Card) : Response
+ playerPlayCard(playerId : Integer, cards : Card[*]) : Response
+ playerPlaceJeton(playerId : Integer, jeton : PlacedJeton)
+ playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*])
+ playerPlaceJeton(playerId : Integer, jeton : PlacedJeton) : Response
+ playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*]) : Response
+ playerResist(playerId : Integer)
+ playerGiveUp(playerId : Integer)
+ playerChooseAction(playerId : Integer, action : Action)
+ playerResist(playerId : Integer, number : Integer) : Response
+ playerGiveUp(playerId : Integer): Response
+ playerChooseAction(playerId : Integer, action : Action): Response
+ askAction(inGameIdPlayer : Integer, askedAction : TAskAction): Action
- sendActionWithoutExpectedResponse(inGameIdPlayer : Integer, askedAction : TAskAction)
- sendFirstRoundStart()
- sendStartPhase()
- sendDescription()
- sendGameIsEnd()
}
class Game{
......@@ -52,33 +59,120 @@ package gamecontroller{
- survivalCardPioche : Pioche<SurvivalCard>
- trackingCardPioche : Pioche<TrackingCard>
- board : Board
- database : NotAloneDatabase
- creature : Creature
- traques : Traque[*]
- playersMap : Map<Integer, Player>
- state : Phase
- room : Room
- currentActivatePowers : PowerContainer[*]
- nextRoundPowers : PowerContainer[*]
- initializePlayer(creatureGameId : Integer)
- gameRoundVariables : GameRoundVariables
- gameClientHandler : GameClientHandler
- initializePlayer(creatureId : Integer, playerNumber : Integer)
- initializeReserve(playerNumber : Integer)
- initializeSurvivalCardPioche()
- initializeTrackingCardPioche()
- initializeCardsOfPlayers()
- sendFirstRoundStart()
+ getCurrentActivatePowers() : Power[*]
+ getNextRoundPowers() : Power[*]
+ getPlanet() : Planet
+ getReserve() : Reserve
+ getSurvivalCardPioche() : Pioche<SurvivalCard>
+ getTrackingCardPioche() : Pioche<TrackingCard>
+ getBoard() : Board
+ getCreature() : Creature
+ getTraques() : Traque[*]
+ getPlayersMap() : Map<Integer, Player>
+ getPlayer(idPlayer : Integer) : Player
+ getGameRoundVariables() : GameRoundVariables
+ getState() : Phase
+ getRoom() : Room
+ isJetonArtemiaIsActive() : boolean
+ getNumberWillingnessDecrementByJetonCreature() : Integer
+ traqueCanResist() : boolean
+ getIdPlayerTargetByTrackingCardAnticipation() : Integer
+ traqueCanPickSurvivalCards() : boolean
- addPowerForNextRound(power : Power)
- disableJetonArtemia()
- enableJetonArtemia()
- setNumberWillingnessDecrementByJetonCreature( number : Integer)
- addNumberWillingnessByJetonCreature()
- setTraqueCanResist()
- setIdPlayerTargetByTrackingCardAnticipation(idPlayerTargetByJetonCreature : Integer)
- setTraqueCanPickSurvivalCards(traqueCanPickSurvivalCards : Boolean)
+ isFinish() : Boolean
+ apply(power : Power)
+ apply(powers : PowerContainer)
+ playerHasFinished(playerId : Integer, phase : Phase)
+ boolean phaseIsFinish()
+ playerPlayCard(playerId : Integer, card : Card)
+ playerPlayCard(playerId : Integer, cards : Card[*])
+ playerPlaceJeton(playerId : Integer, jeton : PlacedJeton)
+ playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*])
+ playerHasFinished(playerId : Integer, phase : Phase) : Response
+ creatureHasFinished(creature : Creature, phase : Phase) : Response
+ boolean traqueHasFinished(traque : Traque, phase : Phase )
+ Response phaseIsFinish(phase : Phase)
+ playerPlayCard(playerId : Integer, card : Card) : Response
+ playerPlayCard(playerId : Integer, cards : Card[*]) : Response
+ playerPlaceJeton(playerId : Integer, jeton : PlacedJeton) : Response
+ playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*]) : Response
+ playerResist(playerId : Integer) : Response
+ playerGiveUp(playerId : Integer) : Response
+ playerChooseAction(playerId : Integer, action : Action) : Response
+ askAction(inGameIdPlayer : Integer, action : TAskAction) : Action
- sendActionWithoutExpectedResponse(inGameIdPlayer : Integer, askedAction : TAskAction)
- sendStartPhase()
- sendDescription()
- sendGameIsEnd()
+ playerPlayPlayerCard(player : Player, card : Card ) : Response
+ playerPlayPlayerCard(player : Player, cards : Card[*] ) : Response
+ creaturePlayTrackingCard(creature : Creature, trackingCard : TrackingCard ) : Response
+ creaturePlayTrackingCard(creature : Creature, trackingCards : TrackingCard[*] ) : Response
- applyCreaturePlayTrackingCard(creature : Creature, trackingCard : TrackingCard )
+ creatureCanPlayThisTrackingCards(creature : Creature, trackingCard : TrackingCard ) : boolean
+ creatureCanPlayThisTrackingCards(creature : Creature, trackingCard : TrackingCard[*] ) : boolean
+ traquePlaySurvivalCard(traque : Traque, survivalCard : SurvivalCard) : Response
+ traquePlaySurvivalCard(traque : Traque, survivalCard : SurvivalCard[*]) : Response
- applyTraquePlaySurvivalCard( traque : Traque, survivalCard : SurvivalCard)
+ traqueCanPlayThisSurvivalCards( traque : Traque, survivalCard : SurvivalCard) : boolean
+ traqueCanPlayThisSurvivalCards( traque : Traque, survivalCards : SurvivalCard[*]) : boolean
+ traquePlayPlaceCard( traque : Traque, placeCard PlaceCard) : Response
+ traquePlayPlaceCard( traque : Traque, placeCard PlaceCard[*]) : Response
+ playerCardsPlayedPhaseAndAppliedPhaseDifferent( playerCard : PlayerCard) : boolean
+ creaturePlaceAJeton( creature : Creature, placedJeton : PlacedJeton) : Response
+ nextPhase(phase : Phase) : Phase
+ allPlayersHasFinishedCurrentPhase() : boolean
- startNextPhase()
- managePhase3()
+ choosePlaceCardsToReveal(traque : Traque) : PlaceCard[*]
- managePhase4()
- nextRound()
- applyNextRoundPowers()
- applyModificatorPower(power : PowerModificator)
- useWillingnessOnBoard()
+ choosePlaceCardsAction(idPlayer : Integer, max : Integer, placesCards : PlaceCard[*]) : PlaceCard[*]
+ chooseSurvivalCardsAction(idPlayer : Integer, max : Integer, survivalCards : SurvivalCard[*]) : SurvivalCard[*]
+ chooseTrackingCardsAction(idPlayer : Integer, max : Integer, trackingCards : TrackingCard[*]) : TrackingCard[*]
+ chooseCardsAction(idPlayer : Integer, max : Integer, cardsToChoose : Card[*]) : Card[*]
+ createTActionForChooseCardsAction( max : Integer, cardsToChoose : Card[*]) : TAskAction
- sendPlaceCardsAction( idPlayer : Integer, cardsToShow : PlaceCard[*])
- sendCardsAction( idPlayer : Integer, cardsToShow : Card[*])
+ createTActionForSendCardsAction(cardsToShow : Card[*]) : TAskAction
+ computeCardListFromCardNames( cardNames : CardName[*], cardsToChoose : Card[*]) : Card[*]
+ choosePower(idPlayer : Integer, powersDescription : String[*]) : Integer
+ targetPlayer(idPlayer : Integer) : Integer
+ choosePlace(idPlayer : Integer, number : Integer) : Place[*]
+ choosePlace(idPlayer : Integer, number : Integer, message : String) : Place[*]
+ movePlayer(idPlayer : Integer) : Pair<Integer, Place>
+ swapJetons(idPlayer : Integer) : Pair<JetonSymbol, JetonSymbol>
+ associateCardNamesToPlaces(idPlayer : Integer, cardsToAssociate : Card[*]) : Map<Card, Place>
+ createTActionForAssociateCardNamesToPlaces( cardsToAssociate : Card[*]) : TAskAction
+ computeMapCardToPlaceFromMapCardNamesToPlace( cardNamePlaceMap : Map<CardName, Place>, cards : Card[*]) : Map<Card, Place>
+ playerResist(playerId : Integer)
+ playerGiveUp(playerId : Integer)
+ playerChooseAction(playerId : Integer, action : Action)
}
}
class RoomFactory{
- {static} idCounter : AtomicInteger
......@@ -244,15 +338,16 @@ package card{
abstract class Card{
# name : String
# id : String
# CardName : String
# description : String
# powers : PowerContainer
+ getName() : String
+ getId() : String
+ getCardName() : String
+ getDescription() : String
+ getPowers() : PowerContainer
+ getType() : String
+ equals(o : Object) : Boolean
+ {abstract} getType() : CardType
+ toString() : String
+ hashCode() : int
}
class PlaceCard {
......@@ -275,7 +370,11 @@ package card{
}
class TrackingCard {
- symbols : List<JetonSymbol>
+ getType() : CardType
+ getJetons() : List<JetonSymbol>
+ containsSymbol(type : JetonSymbole) : boolean
}
Card <|-- PlaceCard
......
Supports Markdown
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