Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 7faead61 rédigé par Malo Grall's avatar Malo Grall
Parcourir les fichiers

Removed new lines for Server

parent 89e1b275
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #55906 réussi
= Spécification des composants
== Relations et interfaces des composants
=== Relation et interfaces de tous les composants
[plantuml, global-interfaces, svg]
....
include::../partials/interfaces-diagrams/global-interfaces.puml[]
....
=== Relation et interfaces côté Serveur
[plantuml, server-interfaces, svg]
....
......@@ -19,12 +25,6 @@ include::../partials/interfaces-diagrams/client-interfaces.puml[]
include::../partials/interfaces-diagrams/cards-interfaces.puml[]
....
=== Relation et interfaces de tous les composants
[plantuml, global-interfaces, svg]
....
include::../partials/interfaces-diagrams/global-interfaces.puml[]
....
== Responsabilités des composants
=== Client
Intéractions avec l'application web
......
......@@ -54,51 +54,48 @@ interface GamePublic {
interface Game extends GamePublic {
- players: List<Player>
'Methods
'Create a Player instance and add it to players
+ addPlayer(String userId, String userName)
'
' Initialize and start the game (UseCase preparation)
+ startGame(): void
'
' End the game
+ endGame(): void
'
' Get the current game with private informations hiden
+ getGamePublic(): GamePublic
'
' Set card as currentCard and remove card from handCards
+ playCard(String playerId, Card card, Action action): void
'
'Get the player with playerId
+ getPlayer(String playerId): Player
' Buy raw material from a player (neighbor)
- buyRessourceFrom(String buyerId, String sellerId, Resource resource): void
'Start the age to set the cards pool
'
' Start the age to set the cards pool
- startAge(Age age): void
'
' Fill every Player::handCards with default cards from currentAgeCards
- distributeCards(): void
'
' Get the 2 neighbors of the player
- getNeighbors(Player p) : Pair<Player, Player>
'
' Give Player::handCards to player neighbor
- nextTurn(): void
'
' Give Player::handCards to player neighbor
- giveNeighbor(List<Card>): void
'
' At the end of Age, compare the army of the 2 neighbors of the player and attribute victory points accordingly
- fight(Player p): void
'
' Get the leaderboard of the game
- getLeaderboard(): Map<Player, int>
......@@ -107,14 +104,14 @@ interface Game extends GamePublic {
interface PlayerPublic {
- userId: String
- userName: String
'
- wonder: Wonder
'
- victoryPoints: int
- defeatPoints: int
- conlictPoints: int
- money: int
'
' Possessed resources
- resources: Map<Resource, int>
' Built cards
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter