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

conception.adoc + modification Traque.java pour la claireté

parent f2944ff2
......@@ -433,61 +433,6 @@ package card{
....
=== Hand TODO
.Package hand
[plantuml]
....
package hand{
class Deck <T extends PlayerCard>{
- cards : T[*]
- maxCards : Integer
+ add(card : T) : Boolean
+ add(cards : T[*]) : Boolean
+ playCard(card : T) : T
+ playCard(cards : T[*]): T[*]
}
class PlaceCardDeck{
- placeCards : PlaceCard[*]
- defausse : PlaceCard[*]
+ throwAway(placeCard : PlaceCard) : Boolean
+ throwAway(placeCards : PlaceCard[*]) : Boolean
+ takeBack(placeCard : PlaceCard) : Boolean
+ takeBack(placeCards : PlaceCard[*]) : Boolean
+ add(card : PlaceCard) : Boolean
+ add(cards : PlaceCard[*]) : Boolean
+ addInDefausse(card : PlaceCard) : Boolean
+ addInDefausse(cards : PlaceCard[*]) : Boolean
+ play(card : PlaceCard) : Boolean
+ play(cards : PlaceCard) : Boolean
}
abstract class Hand{}
class HandCreature{
- trackingCards : Deck<TrackingCard>
- jetons : Set<Jeton>
+ initializationJeton()
+ getTrackingCards() : Deck<TrackingCard>
+ playJeton(jeton : Jeton) : Jeton
+ playJeton(jetons : Set<Jeton>) : Set<Jeton>
}
class HandTraque{
- survivalCards : Deck<SurvivalCard>
- placeCards PlaceCardDeck
+ getSurvivalCards() : Deck<SurvivalCard>
+ getPlaceCards() : PlaceCardDeck
}
Hand <|-- HandCreature
Hand <|-- HandTraque
HandTraque "1" -- "1" PlaceCardDeck
HandCreature "1" -- "1" Deck
HandTraque "1" -- "1" Deck
}
....
=== Jeton
.Package jeton
......@@ -614,7 +559,7 @@ package planet{
+ isRevealedPlace(placeCard : PlaceCard)
}
class Planet{
- mapPlaceToJetons : Map<Place, Jeton[*]>
- mapPlaceToJetons : Map<Place, JetonSymbol[*]>
- blockedPlaces : Map<Place, Boolean>
- placeSurvivalCardMap : Map<Place, SurvivalCard[*]>
- numberMovesAllowInRound : Integer
......@@ -632,8 +577,7 @@ package planet{
- blockPlaces(placeCard : PlaceCard)
+ isBlockedPlace(card : PlaceCard) : Boolean
+ isJetonOnPlace(place : Place) : Boolean
+ isJetonOnPlace(card : PlaceCard) : Boolean
+ findJetonsOnCard(card : PlaceCard) : Jeton[*]
+ isJetonOnPlace(placeCard : PlaceCard) : Boolean
+ findJetonsSymbolsOnCard(placeCard : PlaceCard) : JetonSymbol[*]
+ isJetonSymbolOnPlaceCard(symbol : JetonSymbol,placeCard : PlaceCard) : boolean
+ getPlanetPawn() : PlanetPawn
......@@ -669,22 +613,29 @@ package planet{
+ 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} getType() : PawnType
- {abstract} nextState()
- previousState()
+ {abstract} isActive() : Boolean
+ {abstract} maxMovesInOneRound() : Integer
- reset()
}
class ShieldPawn{
- location : Integer
+ nextState()
- hasReachDome : boolean
+ getLocation() : Integer
- nextState()
- previousState()
+ isActive() : Boolean
+ getType() : PawnType
+ maxMovesInOneRound() : Integer
- reset()
}
......@@ -705,21 +656,93 @@ package player{
abstract class Player{
# name : String
# inGameId : Integer
# status : PlayerStatus
# hand : Hand
# Phase : currentPhase
+ getName() : String
+ getInGameId() : Integer
+ getStatus() : PlayerStatus
+ getHand() : Hand
+ getCurrentPhase() : Phase
+ {abstract} getTeam() : PlayerTeam
- setCurrentPhase(currentPhase : Phase)
+ teamEqualsTo(team : PlayerTeam) : boolean
}
class Traque{
- numberWillingness : Integer
- hand : HandTraque
- rights : TraqueRight
- placeCardsPlayedAfterMoving : PlaceCard[*]
- placeCardsPlayedAndVisible : PlaceCard[*]
+ getNumberWillingness() : Integer
+ addWillingness(delta : Integer)
+ subWillingness(delta : Integer)
+ incrementWillingness()
+ decrementWillingness()
+ getMaxWillingness() : Integer
+ getHand() : HandTraque
+ getRights() : TraqueRight
- addWillingness(delta : Integer)
- subWillingness(delta : Integer)
- incrementWillingness()
- decrementWillingness()
- fillWillingness()
- addPlaceCardsAfterMoving(placeCard : PlaceCard)
- addPlaceCardsAfterMoving(placeCards : PlaceCard[*])
+ getPlaceCardsPlayedAndVisible() : PlaceCard[*]
- addPlaceCardsPlayedAndVisible(placeCard : PlaceCard)
- addPlaceCardsPlayedAndVisible(placeCards : PlaceCard[*])
- reset()
+ getTeam() : PlayerTeam
+ getPlaceCards() : PlaceCard[*]
+ getPlaceCardsPlayed() : PlaceCard[*]
+ getDefausse() : PlaceCard[*]
- setPlaceCards(placeCards : PlaceCard[*])
- setDefausse(placeCards : PlaceCard[*])
+ placeCardHandSize() : Integer
+ placeCardIsEmpty() : boolean
+ defausseSize() : Integer
+ defausseIsEmpty() : boolean
+ placeCardPlayedSize() : Integer
+ placeCardPlayedIsEmpty() : boolean
+ throwAwayPlaceCard() : boolean
+ throwAwayPlaceCard(placeCard : PlaceCard) : boolean
+ throwAwayPlaceCard(placeCards : PlaceCard[*]) : boolean
+ takeBackPlaceCard(placeCard : PlaceCard) : boolean
+ takeBackPlaceCard(placeCards : PlaceCard[*]) : boolean
- takeBackAllPlaceCardFromDefausse()
+ addPlaceCard(placeCard : PlaceCard) : boolean
+ addPlaceCard(placeCards : PlaceCard[*]) : boolean
+ addPlaceCardInDefausse(placeCard : PlaceCard) : boolean
+ addPlaceCardInDefausse(placeCards : PlaceCard[*]) : boolean
+ playPlaceCard(placeCard : PlaceCard) : boolean
+ playPlaceCard(placeCards : PlaceCard[*]) : boolean
+ getSurvivalCardsHand() : SurvivalCard[*]
+ getSurvivalCardsPlayed() : SurvivalCard[*]
+ survivalCardHandSize() : Integer
+ survivalCardPlayedSize() : Integer
+ survivalCardIsEmpty() : boolean
+ survivalCardPlayedIsEmpty() : boolean
- clearSurvivalCardPlayed()
+ addSurvivalCard(survivalCard : SurvivalCard) : boolean
+ addSurvivalCard(survivalCards : SurvivalCard[*]) : boolean
+ removeSurvivalCard(survivalCard : SurvivalCard) : boolean
+ removeSurvivalCard(survivalCards : SurvivalCard[*]) : boolean
+ playSurvivalCard(survivalCard : SurvivalCard) : boolean
+ playSurvivalCard(survivalCards : SurvivalCard[*]) : boolean
- addSurvivalCardToApplied(survivalCard : SurvivalCard)
- removeSurvivalCardToApplied(survivalCard : SurvivalCard)
- removeSurvivalCardToApplied(survivalCards : SurvivalCard[*])
+ getSurvivalCardsToApplied() : SurvivalCard[*]
- resetRight()
+ getMaxPlacesCardChoosable() : Integer
- setMaxPlacesCardChoosable(maxPlacesCardChoosable : Integer)
+ getMaxPlacesCardPlayable() : Integer
- setMaxPlacesCardPlayable(maxPlacesCardPlayable : Integer)
+ getMaxSurvivalCardPlayable() : Integer
- setMaxSurvivalCardPlayable(maxSurvivalCardPlayable : Integer)
+ canResist() : boolean
- setCanResist(canResist : boolean)
+ canGiveUp() : boolean
- setCanGiveUp(canGiveUp : boolean)
+ getPlaceCardsVisible() : Integer
- setPlaceCardsVisible(placeCardsVisible : Integer)
+ canResist() : Integer
- setCanResist(number : Integer)
}
class Creature{
......@@ -772,6 +795,63 @@ package player{
....
=== Hand TODO
.Package hand
[plantuml]
....
package hand{
class Deck <T extends PlayerCard>{
- cards : T[*]
- maxCards : Integer
+ add(card : T) : Boolean
+ add(cards : T[*]) : Boolean
+ playCard(card : T) : T
+ playCard(cards : T[*]): T[*]
}
class PlaceCardDeck{
- placeCards : PlaceCard[*]
- defausse : PlaceCard[*]
+ throwAway(placeCard : PlaceCard) : Boolean
+ throwAway(placeCards : PlaceCard[*]) : Boolean
+ takeBack(placeCard : PlaceCard) : Boolean
+ takeBack(placeCards : PlaceCard[*]) : Boolean
+ add(card : PlaceCard) : Boolean
+ add(cards : PlaceCard[*]) : Boolean
+ addInDefausse(card : PlaceCard) : Boolean
+ addInDefausse(cards : PlaceCard[*]) : Boolean
+ play(card : PlaceCard) : Boolean
+ play(cards : PlaceCard) : Boolean
}
abstract class Hand{}
class HandCreature{
- trackingCards : Deck<TrackingCard>
- jetons : Set<Jeton>
+ initializationJeton()
+ getTrackingCards() : Deck<TrackingCard>
+ playJeton(jeton : Jeton) : Jeton
+ playJeton(jetons : Set<Jeton>) : Set<Jeton>
}
class HandTraque{
- survivalCards : Deck<SurvivalCard>
- placeCards PlaceCardDeck
+ getSurvivalCards() : Deck<SurvivalCard>
+ getPlaceCards() : PlaceCardDeck
}
Hand <|-- HandCreature
Hand <|-- HandTraque
HandTraque "1" -- "1" PlaceCardDeck
HandCreature "1" -- "1" Deck
HandTraque "1" -- "1" Deck
}
....
=== Power
.Package power
[plantuml]
......
......@@ -149,12 +149,12 @@ public class Traque extends Player {
return hand.getDefausse();
}
public void setPlaceCards(List<PlaceCard> cards) {
hand.setPlaceCards(cards);
public void setPlaceCards(List<PlaceCard> placeCards) {
hand.setPlaceCards(placeCards);
}
public void setDefausse(List<PlaceCard> cards) {
hand.setDefausse(cards);
public void setDefausse(List<PlaceCard> placeCards) {
hand.setDefausse(placeCards);
}
public int placeCardHandSize(){
......@@ -191,29 +191,29 @@ public class Traque extends Player {
/**
* Put the card in the "defausse"
* @param card The card
* @param placeCard The card
* @return true is the operation is a succeed, else otherwise
*/
public boolean throwAwayPlaceCard(PlaceCard card){
return hand.throwAwayPlaceCard(card);
public boolean throwAwayPlaceCard(PlaceCard placeCard){
return hand.throwAwayPlaceCard(placeCard);
}
/**
* Put the cards in the "defausse"
* @param cards The cards
* @param placeCards The cards
* @return true is the operation is a succeed, else otherwise
*/
public boolean throwAwayPlaceCard(List<PlaceCard> cards){
return hand.throwAwayPlaceCard(cards);
public boolean throwAwayPlaceCard(List<PlaceCard> placeCards){
return hand.throwAwayPlaceCard(placeCards);
}
/**
* Put back the card in the hand
* @param card The card
* @param placeCard The card
* @return true is the operation is a succeed, else otherwise
*/
public boolean takeBackPlaceCard(PlaceCard card){
return hand.takeBackPlaceCard(card);
public boolean takeBackPlaceCard(PlaceCard placeCard){
return hand.takeBackPlaceCard(placeCard);
}
public void takeBackPlayedPlaceCards() {
......@@ -222,11 +222,11 @@ public class Traque extends Player {
/**
* Put back the cards in the hand
* @param cards The cards
* @param placeCards The cards
* @return true is the operation is a succeed, else otherwise
*/
public boolean takeBackPlaceCard(List<PlaceCard> cards){
return hand.takeBackPlaceCard(cards);
public boolean takeBackPlaceCard(List<PlaceCard> placeCards){
return hand.takeBackPlaceCard(placeCards);
}
/**
......@@ -236,28 +236,28 @@ public class Traque extends Player {
hand.takeBackAllPlaceCardFromDefausse();
}
public boolean addPlaceCard(PlaceCard card){
return hand.addPlaceCard(card);
public boolean addPlaceCard(PlaceCard placeCard){
return hand.addPlaceCard(placeCard);
}
public boolean addPlaceCard(List<PlaceCard> cards){
return hand.addPlaceCard(cards);
public boolean addPlaceCard(List<PlaceCard> placeCards){
return hand.addPlaceCard(placeCards);
}
public boolean addPlaceCardInDefausse(PlaceCard card){
return hand.addPlaceCardInDefausse(card);
public boolean addPlaceCardInDefausse(PlaceCard placeCard){
return hand.addPlaceCardInDefausse(placeCard);
}
public boolean addPlaceCardInDefausse(List<PlaceCard> cards){
return hand.addPlaceCardInDefausse(cards);
public boolean addPlaceCardInDefausse(List<PlaceCard> placeCards){
return hand.addPlaceCardInDefausse(placeCards);
}
public boolean playPlaceCard(PlaceCard card){
return hand.playPlaceCard(card);
public boolean playPlaceCard(PlaceCard placeCard){
return hand.playPlaceCard(placeCard);
}
public boolean playPlaceCard(List<PlaceCard> cards){
return hand.playPlaceCard(cards);
public boolean playPlaceCard(List<PlaceCard> placeCards){
return hand.playPlaceCard(placeCards);
}
public List<SurvivalCard> getSurvivalCardsHand() {
......@@ -289,24 +289,24 @@ public class Traque extends Player {
hand.clearSurvivalCardPlayed();
}
public boolean addSurvivalCard(SurvivalCard card){
return hand.addSurvivalCard(card);
public boolean addSurvivalCard(SurvivalCard survivalCard){
return hand.addSurvivalCard(survivalCard);
}
public boolean addSurvivalCard(List<SurvivalCard> cardList){
return hand.addSurvivalCard(cardList);
}
public boolean removeSurvivalCard(SurvivalCard card){
return hand.removeSurvivalCard(card);
public boolean removeSurvivalCard(SurvivalCard survivalCard){
return hand.removeSurvivalCard(survivalCard);
}
public boolean removeSurvivalCard(List<SurvivalCard> cardList){
return hand.removeSurvivalCard(cardList);
}
public boolean playSurvivalCard(SurvivalCard card){
return hand.playSurvivalCard(card);
public boolean playSurvivalCard(SurvivalCard survivalCard){
return hand.playSurvivalCard(survivalCard);
}
public boolean playSurvivalCard(List<SurvivalCard> cardList){
......
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