... | ... | @@ -89,3 +89,113 @@ Le boss sera représenté par une asset de taille 16px par 16px |
|
|
## Diagrammes UML :link:
|
|
|
|
|
|
### *Diagramme de conception*
|
|
|
|
|
|
```plantuml
|
|
|
left to right direction
|
|
|
|
|
|
class Game {
|
|
|
- soundManager: SoundManager
|
|
|
- screen: Screen
|
|
|
- player: Player
|
|
|
- combat: Combat
|
|
|
- model: Model
|
|
|
- map: Map
|
|
|
+ startGame()
|
|
|
+ endGame()
|
|
|
}
|
|
|
|
|
|
class Player {
|
|
|
- name: String
|
|
|
- pokemons: List<Pokemon>
|
|
|
+ choosePokemon(pokemon: Pokemon)
|
|
|
+ battle(opponent: Pokemon)
|
|
|
}
|
|
|
|
|
|
class Pokemon {
|
|
|
- name: String
|
|
|
- type: PKType
|
|
|
- health: int
|
|
|
- level: int
|
|
|
- attacks: List<Attack>
|
|
|
+ attack(target: Pokemon, attack: Attack)
|
|
|
+ takeDamage(damage: int)
|
|
|
}
|
|
|
|
|
|
class PKType {
|
|
|
- typeName: String
|
|
|
}
|
|
|
|
|
|
class Attack {
|
|
|
- name: String
|
|
|
- type: PKType
|
|
|
- power: int
|
|
|
+ execute(target: Pokemon)
|
|
|
}
|
|
|
|
|
|
class Combat {
|
|
|
- player: Player
|
|
|
- opponent: Pokemon
|
|
|
+ startBattle()
|
|
|
+ endBattle()
|
|
|
}
|
|
|
|
|
|
class Screen {
|
|
|
+ displayMainMenu()
|
|
|
+ displayBattleScreen()
|
|
|
+ updateScreen()
|
|
|
}
|
|
|
|
|
|
class SoundManager {
|
|
|
+ playSound(sound: String)
|
|
|
}
|
|
|
|
|
|
class Model {
|
|
|
- data: Data
|
|
|
- save: Save
|
|
|
+ loadGame()
|
|
|
+ saveGame()
|
|
|
}
|
|
|
|
|
|
class Data {
|
|
|
+ getPokemonData(name: String): Pokemon
|
|
|
+ getAttackData(name: String): Attack
|
|
|
}
|
|
|
|
|
|
class Save {
|
|
|
+ saveGameData(game: Game)
|
|
|
+ loadGameData(): Game
|
|
|
}
|
|
|
|
|
|
class Map {
|
|
|
- objects: List<Object>
|
|
|
- width: int
|
|
|
- height: int
|
|
|
+ loadMap(file: String)
|
|
|
+ updateMap()
|
|
|
+ render()
|
|
|
}
|
|
|
|
|
|
class GUI {
|
|
|
+ displayMainMenu()
|
|
|
+ displayHUD()
|
|
|
+ updateGUI()
|
|
|
}
|
|
|
|
|
|
Game --> SoundManager
|
|
|
Game --> Screen
|
|
|
Game --> Combat
|
|
|
Game --> Model
|
|
|
Game --> Map
|
|
|
Game --> GUI
|
|
|
Model --> Data
|
|
|
Model --> Save
|
|
|
Player --> Pokemon
|
|
|
Combat --> Player
|
|
|
Combat --> Pokemon
|
|
|
Pokemon --> PKType
|
|
|
Pokemon --> Attack
|
|
|
Attack --> PKType
|
|
|
Map --> Screen
|
|
|
GUI --> Game
|
|
|
Screen --> GUI
|
|
|
``` |
|
|
\ No newline at end of file |