classesDiagram.puml 4.13 KB
Newer Older
Mamadou Diallo's avatar
Mamadou Diallo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
@startuml

package model{

    package interfaces{
        interface CardInterface{
            getId() : UUID
            getPhase() : Phase
            getDescription() : String
            getTitle() : Object
        }
        interface PlayerInterface{
            getHand() : CardInterface[*]
            getDiscards() : CardInterface[*]
            getPlayedCards() : CardInterface[*]
            getName() : String
            getId() : UUID
        }
    }
    package cards{
        abstract class Card{
            title : Object
            description : String
            id : UUID

            Card(title: Object, phase: Phase)
            generateId() : UUID
            toString() : String
            addDescription(cardTilte: Object): String
            effect(cardTitle: Object)
        }

        class Lieu{
            Lieu(title: LieuTile, phase: Phase)
            abriEffect()
            jungleEffect()
            riviereEffect()
            plageEffect()
            roverEffect()
            maraisEffect()
            antreEffect()
            epaveEffect()
            sourceEffect()
            artifactEffect()
        }

        class Survie{
           Survie(title: SurvieTitle, phase: Phase)
           vortexEffect()
           esquiveEffect()
           riposteEffect()
           volteFaceEffect()
        }

        class Traque{
            Traque(title: TraqueTitle, phase:Phase)
            mutationEffect()
            flashBackEffect()
            acharnementEffect()
            champsDeForceEffect()
        }
    }

    package players{
        class Player{

            id: UUID
            name: String

            Player(name: String)
            getId() : UUID
            getName() : String
            getHand() : CardInterface[*]
            getDiscards() : CardInterface[*]
            getPlayedCards() : CardInterface[*]
            initialize()
            draw(nbOfCards: Integer)
            toString(): String

        }
        class Creature{
            Creature(name: String)
            toTraque(traqued: Tracked)
        }
        class Tracked{
            Tracked(name: String)
            letGo()
            resist()
        }
        class MasterPlayer{

        }
    }

    package util{

        enum LieuTile{
            ANTRE
            JUNGLE
            RIVIERE
            PLAGE
            ROVER
            MARAIS
            ABRI
            EPAVE
            SOURCE
            ARTEFACT
        }
        enum Phase{
            ONE
            TWO
            THREE
            FOUR
        }
        enum SurvieTitle{
            RIPOSTE
            VORTEX
            ESQUIVE
            VOLTE_FACE
        }
        enum TraqueTitle{
            ACHARNEMENT
            CHAMPS_DE_FORCE
            FLASHBACK
            MUTATION
        }

    }

    package pawns{
        enum PawnName{
                     BALISE
                     ASSIMILATION
                     SECOURS
                     VOLONTE
                     .................
                }
        class Pawn{
            Pawn(name: PawnName)
            getName(): PawnName
        }

        Pawn *--"has Name [1]" PawnName
    }

    package tokens{
        enum TokenName{
                    CIBLE
                    CREATURE
                    ARTEMIA
                }
        class Token{
            Token(name: TokenName)
            getName(): TokenName
        }

        Token *--"has Name [1]" TokenName
    }

 CardInterface <|.. Card
            PlayerInterface <|.. Player

            Card <|-- Lieu
            Card <|-- Survie
            Card <|-- Traque

            Player <|-- Creature
            Player <|-- Tracked

             Player *--"hand [0..n]" CardInterface
             Player *--"discards [0..n]\n" CardInterface
             Player *--"playedCards [0..n]" CardInterface
             Creature *-- "uses [0..n]" Lieu
             Creature *-- "uses [0..n]" Traque
             Card *-- "hasPhase [1]" Phase
             Tracked *-- "hasCards [0..n]" Survie

             Lieu *-- "hasTitle [1] \n\n" LieuTile
             Survie *-- "hasTitle [1]" SurvieTitle
             Traque *-- "hasTitle [1]" TraqueTitle


}

@enduml