diff --git a/flake.nix b/flake.nix index 0f12e67..210ee71 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ jdk21 gradle jetbrains.idea-community + graphviz ]; }; } diff --git a/uml.puml b/uml.puml new file mode 100644 index 0000000..dc05bf9 --- /dev/null +++ b/uml.puml @@ -0,0 +1,828 @@ +@startuml +interface Drawable { ++ void draw() +} + +class Cell { +~ float width +~ int x +~ Character character ++ boolean hasChar() ++ void draw() +} + + +class AuraBubble { +~ Fenster window +~ Random rand +~ boolean won +~ boolean nothing +~ boolean popped +~ float x +~ float extent +~ int color +~ void change_color() ++ void hit_check() +~ void run_out_check() +~ void shrink(float) +~ void reset() +~ void pop() ++ void bubble() ++ boolean draw() +} + + +class Player { +~ int health +~ int maxHealth +~ List skills +~ Skill skill ++ void damage(int) ++ void heal(int) +- void level_sync() ++ void draw() +} + + +class ActiveMQBroker { ++ {static} void main(String[]) +} + +class Tiles { +~ Fenster window +~ Cell[][] tileMap +~ float tilewidth +~ Talkable old_dude +~ Talkable item +~ Random rand +~ Character spot +~ Character empty +~ Character tree +~ Character wall +~ int num_enemies +~ void settings() ++ void draw() ++ ArrayList get(Character) +~ void enemy_death_check(Cell) +~ void spawn_zombie() ++ Character get(int,int) ++ Cell get_cell(int,int) ++ Character set(int,int,Character) +} + + +class FileHandleUtil { +- {static} FileHandleUtil INSTANCE +~ String FILE_PATH ++ {static} FileHandleUtil getInstance() ++ List readScores() ++ List readLatestScores() ++ void addScore(Score) ++ boolean deleteFile() ++ void createFile() +} + + +class Bubble { +~ Fenster window +~ List text +~ boolean opened +~ int index +~ float real_x ++ void open() ++ void close() ++ boolean toggle() ++ boolean toggle_without_open() ++ void content(List) ++ void draw(float,float,int) +} + + +interface Drawable { ++ void draw() +} + +class Cell { +~ float width +~ int x +~ Character character ++ boolean hasChar() ++ void draw() +} + + +class Animation { +~ Fenster window +~ Character player +~ int frame_count +~ int numPoints +~ boolean animating ++ boolean animate(float,float,float,float) +} + + +class Position { +~ Fenster window +~ float x +~ int grid_x ++ PVector get() ++ PVector get_grid() ++ void set(float,float) ++ void set(PVector) ++ void set_on_grid(int,int) ++ void set_grid_x(int) ++ void set_grid_y(int) ++ void grid_x_change(int) ++ void grid_y_change(int) ++ void sync_grid() +} + + +class UI { +~ Fenster window +- void bottomBar(float,float) ++ void healthBar(float,float,int,int) ++ void exp(int,int,float,float) ++ void draw() +} + + +abstract class Fightable { +~ int experience +~ int level +~ float damage_mult ++ {abstract}void damage(int) ++ {abstract}void heal(int) +} + + +class FightScreen { +~ Fenster window +~ boolean isState ++ boolean active() ++ boolean draw() ++ void keyPressed() ++ void mousePressed() +} + + +class Enemy { +~ int health +~ int maxHealth ++ void damage(int) ++ void heal(int) ++ void draw() ++ void interact() +} + + +class Score { +- int rank +- PVector position +- int health +- LocalDateTime date +- int score ++ int getRank() ++ void setRank(int) ++ LocalDateTime getDate() ++ void setDate(LocalDateTime) ++ int getScore() ++ PVector getPosition() ++ int getHealth() ++ void setScore(int) ++ String toString() ++ {static} Score fromString(String) +} + + +class Enemy { +~ int health +~ int maxHealth ++ void damage(int) ++ void heal(int) ++ void draw() ++ void interact() +} + + +class Dialog { +~ Fenster window +~ Bubble bubbel +~ Talkable character ++ void interact() +} + + +class Skill { +~ Fenster window +~ Character user +~ Character target +~ {static} int power +~ int numPoints +~ boolean animating ++ void use(Fightable) ++ void animate() ++ boolean draw() +} + + +class AuraFight { +~ Player player +~ Enemy enemy +~ AuraBubble my_aura +~ float player_x +~ float player_y +~ float enemy_x +~ float enemy_y +~ boolean pos_set +~ Skill running_move +~ void drawPlayer() +~ void drawEnemy() +~ boolean getRandomBoolean() ++ void draw() ++ void hit_check() +} + + +class Score { +- int rank +- PVector position +- int health +- LocalDateTime date +- int score ++ int getRank() ++ void setRank(int) ++ LocalDateTime getDate() ++ void setDate(LocalDateTime) ++ int getScore() ++ PVector getPosition() ++ int getHealth() ++ void setScore(int) ++ String toString() ++ {static} Score fromString(String) +} + + +class Tiles { +~ Fenster window +~ Cell[][] tileMap +~ float tilewidth +~ Talkable old_dude +~ Random rand +~ Character spot +~ Character empty +~ Character tree +~ Character wall +~ int num_enemies +~ void settings() ++ void draw() ++ ArrayList get(Character) +~ void enemy_death_check(Cell) +~ void spawn_zombie() ++ Character get(int,int) ++ Cell get_cell(int,int) ++ Character set(int,int,Character) +} + + +class AniShrink { +~ int numPoints +~ boolean playing ++ boolean animate(int,int) +- int shrink(int,int) +} + + +class DeathScreen { +~ Fenster window +~ int all_gamma +~ int rect_gamma +~ boolean all_fade +~ boolean isState ++ boolean active() +~ void restart_text() +~ void restart_rect() ++ boolean draw() ++ void mousePressed() +} + + +interface Interactable { ++ void interact() +} + +class Fight { +~ Player player +~ Enemy enemy +~ float player_x +~ float player_y +~ float enemy_x +~ float enemy_y +~ boolean pos_set +~ Skill running_move +~ void drawPlayer() +~ void drawEnemy() ++ void attack() ++ void draw() +} + + +class Main { ++ {static} void main(String[]) +} + +class UI { +~ Fenster window +- void bottomBar(float,float) ++ void healthBar(float,float,int,int) ++ void exp(int) ++ void draw() +} + + +class GameScreen { +~ Fenster window +~ boolean isState +~ Tiles tiles +~ Player player +~ UI ui +~ char up +~ char left +~ char down +~ char right +~ Character old_player_cell +~ int old_player_x +~ int old_player_y ++ boolean active() ++ boolean draw() ++ void keyPressed() +} + + +class Tritt { +~ boolean animating +~ Animation animation ++ void use(Fightable) ++ void animate() ++ boolean draw() +} + + +class Position { +~ Fenster window +~ float x +~ int grid_x ++ PVector get() ++ PVector get_grid() ++ void set(float,float) ++ void set(PVector) ++ void set_on_grid(int,int) ++ void set_grid_x(int) ++ void set_grid_y(int) ++ void grid_x_change(int) ++ void grid_y_change(int) ++ void sync_grid() +} + + +class AuraFight { +~ Player player +~ Enemy enemy +~ AuraBubble my_aura +~ float player_x +~ float player_y +~ float enemy_x +~ float enemy_y +~ boolean pos_set +~ Skill running_move +~ void drawPlayer() +~ void drawEnemy() +~ boolean getRandomBoolean() ++ void draw() ++ void hit_check() +} + + +class Talkable { +~ Bubble bubble ++ void interact() ++ void draw() +} + + +class StartScreen { +~ Fenster window +~ boolean isState +~ Bubble startingDialog +~ AniShrink startingAnimation ++ boolean active() ++ void setup() ++ boolean draw() ++ void keyPressed() +} + + +interface State { +~ {static} Fenster window +~ {static} boolean isState ++ boolean active() ++ boolean draw() +} + + +class DeathScreen { +~ Fenster window +~ int all_gamma +~ int rect_gamma +~ boolean all_fade +~ boolean isState ++ boolean active() +~ void restart_text() +~ void restart_rect() ++ boolean draw() ++ void mousePressed() +} + + +class AniMove { ++ boolean animate(float,float,float,float) ++ PVector move(float,float,float,float) +} + +class AniShrink { +~ int numPoints +~ boolean playing ++ boolean animate(int,int) +- int shrink(int,int) +} + + +class Skill { +~ Fenster window +~ Fightable user +~ Fightable target +~ {static} int power +~ int numPoints +~ boolean animating ++ void use(Fightable) ++ void animate() ++ boolean draw() +} + + +class Dialog { +~ Fenster window +~ Bubble bubbel +~ Talkable character ++ void interact() +} + + +class AniMove { ++ boolean animate(float,float,float,float) ++ PVector move(float,float,float,float) +} + +class Animation { +~ Fenster window +~ Character player +~ int frame_count +~ int numPoints +~ boolean animating ++ boolean animate(float,float,float,float) +} + + +interface Health { ++ void damage(int) ++ void heal(int) +} + +class Tritt { +~ boolean animating +~ Animation animation ++ void use(Fightable) ++ void animate() ++ boolean draw() +} + + +class StartScreen { +~ Fenster window +~ boolean isState +~ Bubble startingDialog +~ AniShrink startingAnimation ++ boolean active() ++ void setup() ++ boolean draw() ++ void keyPressed() +} + + +class AuraBubble { +~ Fenster window +~ Random rand +~ boolean won +~ boolean nothing +~ boolean popped +~ float x +~ float extent +~ int color +~ void change_color() ++ void hit_check() +~ void run_out_check() +~ void shrink(float) +~ void reset() +~ void pop() ++ void bubble() ++ boolean draw() +} + + +class Player { +~ int health +~ int maxHealth +~ List skills +~ Skill skill ++ void damage(int) ++ void heal(int) +} + + +abstract class Fightable { ++ {abstract}void damage(int) ++ {abstract}void heal(int) +} + +class Main { ++ {static} void main(String[]) +} + +class AuraFail { +~ void change_color() +~ void run_out_check() ++ void hit_check() +} + +class AuraFail { +~ void change_color() +~ void run_out_check() ++ void hit_check() +} + +class Bubble { +~ Fenster window +~ List text +~ boolean opened +~ int index +~ float real_x ++ void open() ++ void close() ++ boolean toggle() ++ boolean toggle_without_open() ++ void content(List) ++ void draw(float,float,int) +} + + +class Main { ++ {static} void main(String[]) +} + +class Talkable { +~ Bubble bubble +~ boolean healme ++ void interact() ++ void draw() +} + + +class FileHandleUtil { +- {static} FileHandleUtil INSTANCE +~ String FILE_PATH ++ {static} FileHandleUtil getInstance() ++ List readScores() ++ List readLatestScores() ++ void addScore(Score) ++ boolean deleteFile() ++ void createFile() +} + + +class Fenster { +~ Score save +~ FileHandleUtil savefile +~ Player player +~ Tiles tiles +~ int translate_x +~ int translate_y +~ float tilewidth +~ StartScreen startScreen +~ GameScreen gameScreen +~ FightScreen fightScreen +~ DeathScreen deathScreen +~ SoundFile soundTrack +~ SoundFile confirm +~ SoundFile enemyDamage +~ SoundFile playerDamage +~ SoundFile healEffect +~ SoundFile shrinkEffect +~ SoundFile noHit +~ SoundFile deathSound +~ SoundFile restart +~ boolean gametitel +~ Fight myfight +~ AuraFight auraFight +~ int gametitel_gamma +~ boolean gametitel_fade +~ UI ui ++ {static} void main(String[]) ++ void settings() ++ void setup() ++ void draw() ++ void keyPressed(processing.event.KeyEvent) ++ void mousePressed() +~ void setupPlayer() +~ void closeGame() +~ void classSetup() +~ void classSetupWithSave() ++ void dead() ++ void reset() +} + + +interface State { +~ {static} Fenster window +~ {static} boolean isState ++ boolean active() ++ boolean draw() +} + + +class Character { +~ Fenster window +~ String type +~ int color +~ boolean collidable +~ Position pos +~ int experience +~ int level +~ float damage_mult +~ int textsize ++ void draw() +} + + +class GameScreen { +~ Fenster window +~ boolean isState +~ Tiles tiles +~ Player player +~ UI ui +~ char up +~ char left +~ char down +~ char right +~ Character old_player_cell +~ int old_player_x +~ int old_player_y ++ boolean active() ++ boolean draw() ++ void keyPressed() +} + + +interface Interactable { ++ void interact() +} + +interface Health { ++ void damage(int) ++ void heal(int) +} + +class Fight { +~ Player player +~ Enemy enemy +~ float player_x +~ float player_y +~ float enemy_x +~ float enemy_y +~ boolean pos_set +~ Skill running_move +~ void drawPlayer() +~ void drawEnemy() ++ void attack() ++ void draw() +} + + +class FightScreen { +~ Fenster window +~ boolean isState ++ boolean active() ++ boolean draw() ++ void keyPressed() ++ void mousePressed() +} + + +class Character { +~ Fenster window +~ String type +~ int color +~ boolean collidable +~ Position pos +~ int textsize ++ void draw() +} + + +class Fenster { +~ Score save +~ FileHandleUtil savefile +~ Player player +~ Tiles tiles +~ float tilewidth +~ StartScreen startScreen +~ GameScreen gameScreen +~ FightScreen fightScreen +~ DeathScreen deathScreen +~ SoundFile soundTrack +~ SoundFile confirm +~ SoundFile enemyDamage +~ SoundFile playerDamage +~ SoundFile healEffect +~ SoundFile shrinkEffect +~ SoundFile noHit +~ SoundFile deathSound +~ SoundFile restart +~ boolean gametitel +~ Fight myfight +~ AuraFight auraFight +~ int gametitel_gamma +~ boolean gametitel_fade +~ UI ui ++ {static} void main(String[]) ++ void settings() ++ void setup() ++ void draw() ++ void keyPressed(processing.event.KeyEvent) ++ void mousePressed() +~ void setupPlayer() +~ void closeGame() +~ void classSetup() ++ void dead() ++ void reset() +} + + + + +Health <|.. Player +Fightable <|-- Player +Drawable <|.. Tiles +Character <|-- Fightable +State <|.. FightScreen +Health <|.. Enemy +Interactable <|.. Enemy +Fightable <|-- Enemy +Health <|.. Enemy +Interactable <|.. Enemy +Fightable <|-- Enemy +Interactable <|.. Dialog +Drawable <|.. AuraFight +Bubble <|-- AuraFight +Drawable <|.. Tiles +Animation <|-- AniShrink +State <|.. DeathScreen +Bubble <|-- Fight +State <|.. GameScreen +Skill <|-- Tritt +Drawable <|.. AuraFight +Bubble <|-- AuraFight +Interactable <|.. Talkable +Character <|-- Talkable +State <|.. StartScreen +State <|.. DeathScreen +Animation <|-- AniMove +Animation <|-- AniShrink +Interactable <|.. Dialog +Animation <|-- AniMove +Skill <|-- Tritt +State <|.. StartScreen +Health <|.. Player +Fightable <|-- Player +Character <|-- Fightable +AuraBubble <|-- AuraFail +AuraBubble <|-- AuraFail +Interactable <|.. Talkable +Character <|-- Talkable +processing.core.PApplet <|-- Fenster +Drawable <|.. Character +State <|.. GameScreen +Bubble <|-- Fight +State <|.. FightScreen +Drawable <|.. Character +processing.core.PApplet <|-- Fenster +@enduml \ No newline at end of file