@startuml
'https://plantuml.com/class-diagram

class Main {
+ static void main(String[] args
Game game = new game ("Vaporwave Rhythm Racer")
}

class Game {
- String name
- boolean gameRunning
- boolean mainMenuRunning
- boolean settingsMenuRunning
- boolean leaderboardsMenuRunning
- boolean exitGameMenuRunning
'maybe use tree map
- ArrayList<Integer> highScores

'objects
+ PApplet pApplet
+ AudioPlayer audioPlayer
+ Player player
+ Obstacle block
+ Obstacle speedUp
+ PowerUp heal
+ PowerUp slowTime
+ PowerUp superTime


'constructor
+ Game (String name)
+ void draw()
+ void setup()
+ void runStartMenu()
+ void settingsMenu()
'checks for player collisions
+ void runGameChecks()
+ void continueGame()
+ void playerDeath()
+ void quitProgram()
}

abstract class AGraphics{
+ PApplet pApplet
+ AGraphics(PApplet pApplet)
+ displayGraphics()
}


'extra feature for later
class AudioPlayer{
- boolean songPlaying

'constructor
+ AudioPlayer()
+ void playSong()
+ void stopSong()
}

'creates different obstacles
abstract class GameObject{
- double xPosition
- double zPosition

'constructor
+ GameObject(double xPosition, PApplet pApplet)
+ double getXPosition()
}

abstract class CollisionObject{
- String name
- double yPosition

'constructor
+ CollisionObject(String name, double yPosition)
- void onCollision()
- void playSound()
+ double getYPosition()
+ double setYPosition()
}

'handles the player's input
class Player{
- int health
- int maxHealth
- int scorePoints
- boolean super = false

'constructor, set players health to 3 or w/e we want in the constructor & maxHealth
+ Player(int health)
+ int getHealth()
+ void changeHealth(int amount)
+ void changeScorePoints(int amount)
+ int getScorePoints()
+ void resetScorePoints()
}

class Obstacle{
- int damage
- int speedUpTimer

'constructor
+ Obstacle (int damage, int speedUpTimer)
+ int getDamage()
+ int getSpeedUpTimer()
'- boolean moreObstacles    adds more obstacles to the game for a short time
'- int moreObstaclesTimer
'- boolean hacked   add stuff to the screen that makes it hard to see the game
'- int hackedTimer
}

class PowerUp{
- int healing
- int superTimer
- int slowTimer
- int points

'constructor
+ PowerUp(int healing, int superTimer, int slowTimer, int points)
+ int getHealing()
+ int getSuper()
+ int getSlow()
+ int getPoints()
}

'creates buttons and general UI for the user to interact with
class GameUI{
+ PApplet pApplet
- boolean overButton

'constructor
+ GameUI()
+ boolean promptBinary(String message)
+ int promptNumeric()
+ boolean overButton(Button button)
+ void mousePressed()
'+ void createSlider()      check processing "Handles" example
}

class Button{
+ PApplet pApplet
- boolean showButton
- int width
- int height
- int xPosition
- int yPosition
- String message
- boolean buttonPressed

'constructor
+ Button (int x, int y, int width, int height, String message, PApplet pApplet)
+ void drawButton(x, y, width, height, String message)
+ void buttonPressed()
+ Button getButton()
}


class Graphics{
+ PApplet pApplet
- int w
- int h
- int rows
- int cols
- int gridStroke
- int gridFill
- int scl = 48
- int[][] landscape
'constructor
+ Graphics()
+ void createLandscape()
+ void drawGrid()
+ void drawGradient(float startY, float endY, color colorStart, color colorEnd)
+ void generateNoiseMap()
}

'handles highscores
class FileIO{
- Scanner scanner
- String highscorePath

'constructor
+ FileIO ()
' use treeMap to sort list, so that the highest highscore gets displayed in the top
+ ArrayList<Integer> readScoreboard(String path)
+ void newScore(String path, int score, ArrayList<Integer>)
}

Main *-- Game
Game *-- FileIO
Game *-- AudioPlayer
Game *-- AGraphics
Game *-- GameObject
Game *-- GameUI
GameObject o-- Player
GameObject *-- CollisionObject
CollisionObject o-- Obstacle
CollisionObject o-- PowerUp
GameUI o-- Button
AGraphics o-- Graphics


@enduml