Commit 4ec2b261 authored by Killian LUCAS's avatar Killian LUCAS
Browse files

update of conception.adoc

parent 20a5b4a8
...@@ -25,24 +25,44 @@ field->select() ...@@ -25,24 +25,44 @@ field->select()
.... ....
class Room{ class Room{
- requests : BlockingQueue<GameRequest> - requests : BlockingQueue<GameRequest>
- numberPlayers : AtomicInteger - playersCounter : AtomicInteger
- roomId : String - roomId : String
- roomCreatorId : String - creator : User
- players : Map<String, Integer> - players : Map<String, Integer>
- room : Game - users : Map<Integer,User>
- isStart : Boolean - isStart : Boolean
- isClose : Boolean - isClose : Boolean
- play : Thread - play : Thread
- game : Game - game : Game
- static(MAX_PLAYER : int) - static(MAX_PLAYER : Integer)
- static(MIN_PLAYER : int) - static(MIN_PLAYER : Integer)
+ getRoomId() : String + getRoomId() : String
+ getNumberPlayers() : AtomicInteger + getNumberPlayers() : AtomicInteger
+ isCreator(playerId : String) : Boolean + isCreator(user : User) : Boolean
+ join(playerId : String) : Response - setGame(game : Game)
+ start(playerId : String, planet : Planet, board : Board, creatureNumber : Integer) : Response + join(user : User) : Response
+ start(user : User, creatureNumber : Integer, board : Board, planet : Planet) : Response
+ getGameDescription(user : User) : TDescription
- requestManagement() - requestManagement()
- handleRequest(request : GameRequest) - handleRequest(request : GameRequest)
- sendFinishPhase(user : User, phase : Phase)
- sendPlayCards(user : User, playerCards : PlayerCards[*])
- sendPlaceJetons(user : User, placedJetons : PlacedJeton[*])
- sendResist(user : User, number : Integer)
- sendGiveUp(user : User)
+ askAction(inGameIdPlayer : Integer, askedAction : TAskAction ) : Action
- sendAction(inGameIdPlayer : Integer, askedAction : TAskAction )
- sendFirstRoundStart()
- sendStartPhase(idPlayer : Integer, tPhase : TPhase, description : TDescription )
- sendDescription(idPlayer : Integer, description : TDescription )
- sendGameIsFinished(winner : TPlayerTeam )
- inGameIdToUser(id : Integer ) : User
- inGameIdToUser(user : User ) : Integer
- playersToIdNamePairList(user : User ) : Pair<Integer, String>[*]
- playerToIdNamePair(inGameId : Integer ) <Pair<Integer, String>
- userIsInRoom(user : User ) boolean
} }
...@@ -50,7 +70,6 @@ class Room{ ...@@ -50,7 +70,6 @@ class Room{
interface GameInterface{ interface GameInterface{
+ isFinish() : Boolean + isFinish() : Boolean
+ playerHasFinished(playerId : Integer, phase : Phase) + playerHasFinished(playerId : Integer, phase : Phase)
+ phaseIsFinish() : Boolean
+ playerPlayCard(playerId : Integer, card : Card) : Response + playerPlayCard(playerId : Integer, card : Card) : Response
+ playerPlayCard(playerId : Integer, cards : Card[*]) : Response + playerPlayCard(playerId : Integer, cards : Card[*]) : Response
...@@ -61,14 +80,15 @@ class Room{ ...@@ -61,14 +80,15 @@ class Room{
+ playerGiveUp(playerId : Integer): Response + playerGiveUp(playerId : Integer): Response
+ playerChooseAction(playerId : Integer, action : Action): Response + playerChooseAction(playerId : Integer, action : Action): Response
+ askAction(inGameIdPlayer : Integer, askedAction : TAskAction): Action + askAction(inGameIdPlayer : Integer, askedAction : TAskAction): Action
- sendActionWithoutExpectedResponse(inGameIdPlayer : Integer, askedAction : TAskAction) - sendAction(inGameIdPlayer : Integer, askedAction : TAskAction)
- sendFirstRoundStart() - sendFirstRoundStart()
- sendStartPhase() - sendStartPhase()
- sendDescription() - sendDescription()
- sendGameIsEnd() - sendGameIsFinished()
} }
class Game{ class Game{
- nextRoundPowers : Power[*]
- planet : Planet - planet : Planet
- reserve : Reserve - reserve : Reserve
- survivalCardPioche : Pioche<SurvivalCard> - survivalCardPioche : Pioche<SurvivalCard>
...@@ -80,20 +100,15 @@ class Room{ ...@@ -80,20 +100,15 @@ class Room{
- playersMap : Map<Integer, Player> - playersMap : Map<Integer, Player>
- state : Phase - state : Phase
- room : Room - room : Room
- currentActivatePowers : PowerContainer[*]
- nextRoundPowers : PowerContainer[*]
- gameRoundVariables : GameRoundVariables - gameRoundVariables : GameRoundVariables
- playerServiceHandler : GameClientHandler
- initializePlayer(creatureId : Integer, playerNumber : Integer) - initializePlayer(playersId : Integer[*], creatureId : Integer)
- initializePlayer(players : Pair<Integer, String>[*], creatureId : Integer)
- initializeReserve(playerNumber : Integer) - initializeReserve(playerNumber : Integer)
- initializeSurvivalCardPioche() - initializeSurvivalCardPioche()
- initializeTrackingCardPioche() - initializeTrackingCardPioche()
- initializeCardsOfPlayers() - initializeCardsOfPlayers()
- sendFirstRoundStart()
+ getCurrentActivatePowers() : Power[*]
+ getNextRoundPowers() : Power[*]
+ getPlanet() : Planet + getPlanet() : Planet
+ getReserve() : Reserve + getReserve() : Reserve
+ getSurvivalCardPioche() : Pioche<SurvivalCard> + getSurvivalCardPioche() : Pioche<SurvivalCard>
...@@ -116,7 +131,7 @@ class Room{ ...@@ -116,7 +131,7 @@ class Room{
- enableJetonArtemia() - enableJetonArtemia()
- setNumberWillingnessDecrementByJetonCreature( number : Integer) - setNumberWillingnessDecrementByJetonCreature( number : Integer)
- addNumberWillingnessByJetonCreature() - addNumberWillingnessByJetonCreature()
- setTraqueCanResist() - setTraqueCanResist(traqueCanResist : boolean)
- setIdPlayerTargetByTrackingCardAnticipation(idPlayerTargetByJetonCreature : Integer) - setIdPlayerTargetByTrackingCardAnticipation(idPlayerTargetByJetonCreature : Integer)
- setTraqueCanPickSurvivalCards(traqueCanPickSurvivalCards : Boolean) - setTraqueCanPickSurvivalCards(traqueCanPickSurvivalCards : Boolean)
...@@ -125,21 +140,21 @@ class Room{ ...@@ -125,21 +140,21 @@ class Room{
+ playerHasFinished(playerId : Integer, phase : Phase) : Response + playerHasFinished(playerId : Integer, phase : Phase) : Response
+ creatureHasFinished(creature : Creature, phase : Phase) : Response + creatureHasFinished(creature : Creature, phase : Phase) : Response
+ boolean traqueHasFinished(traque : Traque, phase : Phase ) + boolean traqueHasFinished(traque : Traque, phase : Phase )
+ Response phaseIsFinish(phase : Phase) - playerFinishedPhase(player : Player, phase : Phase)
+ playerPlayCard(playerId : Integer, card : Card) : Response + playerPlayCard(playerId : Integer, card : Card) : Response
+ playerPlayCard(playerId : Integer, cards : Card[*]) : Response + playerPlayCard(playerId : Integer, cards : Card[*]) : Response
+ playerPlaceJeton(playerId : Integer, jeton : PlacedJeton) : Response + playerPlaceJeton(playerId : Integer, jeton : PlacedJeton) : Response
+ playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*]) : Response + playerPlaceJeton(playerId : Integer, jetons : PlacedJeton[*]) : Response
+ playerResist(playerId : Integer) : Response + playerResist(playerId : Integer; number : Integer) : Response
+ playerGiveUp(playerId : Integer) : Response + playerGiveUp(playerId : Integer) : Response
+ playerChooseAction(playerId : Integer, action : Action) : Response
+ askAction(inGameIdPlayer : Integer, action : TAskAction) : Action + askAction(inGameIdPlayer : Integer, action : TAskAction) : Action
- sendActionWithoutExpectedResponse(inGameIdPlayer : Integer, askedAction : TAskAction) - sendAction(inGameIdPlayer : Integer, askedAction : TAskAction)
- sendFirstRoundStart()
- sendStartPhase() - sendStartPhase()
- sendDescription() - sendDescription()
- sendGameIsEnd() - sendGameIsFinished()
+ playerPlayPlayerCard(player : Player, card : Card ) : Response + playerPlayPlayerCard(player : Player, card : Card ) : Response
+ playerPlayPlayerCard(player : Player, cards : Card[*] ) : Response + playerPlayPlayerCard(player : Player, cards : Card[*] ) : Response
+ creaturePlayTrackingCard(creature : Creature, trackingCard : TrackingCard ) : Response + creaturePlayTrackingCard(creature : Creature, trackingCard : TrackingCard ) : Response
...@@ -182,8 +197,10 @@ class Room{ ...@@ -182,8 +197,10 @@ class Room{
+ movePlayer(idPlayer : Integer) : Pair<Integer, Place> + movePlayer(idPlayer : Integer) : Pair<Integer, Place>
+ swapJetons(idPlayer : Integer) : Pair<JetonSymbol, JetonSymbol> + swapJetons(idPlayer : Integer) : Pair<JetonSymbol, JetonSymbol>
+ associateCardNamesToPlaces(idPlayer : Integer, cardsToAssociate : Card[*]) : Map<Card, Place> + associateCardNamesToPlaces(idPlayer : Integer, cardsToAssociate : Card[*]) : Map<Card, Place>
+ createTActiobj : ObjectonForAssociateCardNamesToPlaces( cardsToAssociate : Card[*]) : TAskAction + createTActionForAssociateCardNamesToPlaces( cardsToAssociate : Card[*]) : TAskAction
+ computeMapCardToPlaceFromMapCardNamesToPlace( cardNamePlaceMap : Map<CardName, Place>, cards : Card[*]) : Map<Card, Place> + computeMapCardToPlaceFromMapCardNamesToPlace( cardNamePlaceMap : Map<CardName, Place>, cards : Card[*]) : Map<Card, Place>
- isJetonCibleOnThisPlace(place : Place[*]) : boolean
+ createDescription(playerId : Integer) : TDescription
} }
...@@ -196,9 +213,18 @@ class RoomFactory{ ...@@ -196,9 +213,18 @@ class RoomFactory{
class RoomServiceController{ class RoomServiceController{
- rooms : Map<String, Room> - rooms : Map<String, Room>
- players : Map<String, Room> - players : Map<String, Room>
- getRooms() : Map<String, Room>
- getPlayers() : Map<User, String>
+ addRoom(room : Room) : boolean
+ createRoom(playerId : String) : String + createRoom(playerId : String) : String
+ joinRoom(playerId : String, roomId : String) : Response + joinRoom(playerId : String, roomId : String) : Response
+ startGame(playerId : String, creatureId : Integer, board : Board, planet : Planet) : Response + startGame(playerId : String, creatureId : Integer, board : Board, planet : Planet) : Response
+ getGameDescription(user : User) : TDescription
- sendFinishPhase(user : User, phase : Phase)
- sendPlayCards(user : User, cards : Card[*])
- sendPlaceJetons(user : User, placedJetons : PlacedJeton[*])
- sendResist(user : User, number : Integer)
- sendGiveUp(user : User)
} }
class PowerApplicator{ class PowerApplicator{
- database : NotAloneDatabase - database : NotAloneDatabase
...@@ -488,6 +514,9 @@ class GameRoundVariables{ ...@@ -488,6 +514,9 @@ class GameRoundVariables{
} }
Game "1" -- "1" Room
RoomServiceController <|-- Room
GameRoundVariables <|-- Games
.... ....
......
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