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

update of conception.adoc

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