@startuml
'https://plantuml.com/class-diagram
!pragma layout smetana


Class Main{
+static void main(String[] args)
}


Class RoleMaster{}

Class Rules{
+static Map<String, SkillCategory> getEmptySkillList()
+static Map<String, String> getTalentsAndFlaws()
}
Class Dice{
 Random random = new Random()
+int rollD4()
+int rollD8()
+int rollD10()
+int rollD12()
+int rollD20()
+int rollD100()

}

package controllers{

Class CharacterSheetController{
-CreateStatsView view;
+CharacterSheetController(CreateStatsView view)
}
Class ChooseProffessionController{
-final CharacterSheet model;
-ChooseProfessionView view;
+ChooseProfessionController(CharacterSheet model, ChooseProfessionView view)
-boolean validate(Profession profession)
-void saveDataToModel(Profession profession)
}

Class CreateBackgroundController{
-CreateBackgroundView view;
-CharacterSheet model;
+CreateBackgroundController(CreateBackgroundView view,CharacterSheet model)
-boolean validate()
-void saveDataToModel(String data)
-boolean validateAndSave()
}
Class CreateNewCharController{
-CreateNewCharView view;
-final CharacterSheet model;
+CreateNewCharController(CreateNewCharView view, CharacterSheet model)
+boolean validate(String name)
+void saveDataToModel(String name)
+boolean validateAndSave()
}
Class CreateStatsController{
 CharacterSheet model;
 CreateStatsView view;
 +CreateStatsController(CharacterSheet model, CreateStatsView view)
 -boolean validate(String input)
 -void saveDataToModel(String data)
 +boolean validateAndSave()
 -int[] generateStat()
 -List<int[]> generateStats()
}
CLass TalentsAndFlawsController{
-final CharacterSheet model;
-final TalentsAndFlawsView view;
-final Rules rules;
+TalentsAndFlawsController(CharacterSheet model, TalentsAndFlawsView view)
}

}


package views{

Class StartMenuView{
-JPanel buttonPanel;
-JButton createNewButton;
-JButton loadExistingButton;
+StartMenuView()
+JPanel createButtonPanel()
+void createNewClick(ActionListener actionListener)
+void loadCharacterClick(ActionListener actionListener)
}
Class CharacterSheetView{}
Class CharacterInfoView{}
Class SkillListView{}
Class SpellListView{}
Class InventoryView{}

Class CreateBackgroundView{
-JLabel titleLabel;
-JTextArea textArea;
-JPanel buttonPanel;
-JButton previousButton;
-JButton continueButton;
+CreateBackgroundView()
+Panel createButtonPanel()
+void previousButtonClick
+void continueButtonClick(ActionListener actionListener)
+String getWrittenBackground()
}

Class TalentsAndFlawsView{
-List<JLabel> labels;
-List<JTextField> fields;
-JPanel detailPanel;
-JSplitPane splitPane;
-Map<String, Integer> selectedTalents;
-JLabel pointsLabel;
-int totalPoints = 10;
-Map<String, String> talentDescriptionMap;
+TalentsAndFlawsView(Map<String, String> talentDescriptionMap)
-void showDetailPanel(String text)
-JScrollPane createScrollPane()
-JPanel createTopPanel()
-JPanel createBottomPanel()
-void addTalents()
-void updatePoints()
-void saveTalents()
-String escapeHtml(String text)
}
Class MovementView{}
Class PrimaryStatsView{}
Class WeaponAttackSetupView{}
Class DefenseView{}
Class MagicItemsView{}
Class GeneralEquipmentView{}
Class MainFrame{
-final CardLayout cardLayout;
+MainFrame()
}
Class CreateStatsView{
-final JLabel title;
-final List<JLabel> labels;
-final List<JTextField[]> fields;
-final JButton returnToCharacterInfo;
-final JButton saveAndContinueToSkills;
-final JButton rollStatsForMe;
+CreateStatsView()
+JPanel createMiddlePanel()
-JPanel createTopPanel()
-JPanel createBottomPanel()
+int[] getStat(int i)
+int[] getAgility()
+int[] getConstitution()
+int[] getEmpathy()
+int[] getIntuition()
+int[] getMemory()
+int[] getPresence()
+int[] getQuickness()
+int[] getReasoning()
+int[] getSelfDiscipline()
+int[] getStrength()
+List<int[]> getStats()
+void setStats(List<int[]> stats)
+void returnToCharacterButtonClick (ActionListener actionListener)
+ void saveAndContinueButtonClick(ActionListener actionListener)
+void rollStatsForMeButtonClick (ActionListener actionListener)
+ void reset()
+int getMax(int a, int b, int c)
+ int getMiddle(int a, int b, int c)
}
Class CreateNewCharView{
-JLabel title;
-JTextField nameField;
-JLabel label;
#JButton saveAndContinueButton;
+CreateNewCharView()
-JPanel createTopPanel()
-JPanel createMiddlePanel()
-JPanel createBottomPanel()
+String getNameField()
+void saveAndContinue(ActionListener actionListener)
+void reset(boolean bln)
+void setNameField(String setText)
}
Class ChooseProffessionView{
-JLabel title;
-String[] proffessionList
-List<Profession> professionList;
-List<SkillCategory>skillAndCostList
-List<Skill>proffessionalSkill
-JTextArea proffessionDescription
-JCheckBox proffessionalBonusButton
-JCheckBox KnackButton
-JButton returnToCharacterName
-JButton saveAndContinueToRace
+ChooseProffessionView()
-Panel createTitlePanel()
-JPanel createProfessionListPanel()
-JPanel createProfessionInfoPanel()
-JPanel createProfessionTopInfoPanel()
-JPanel createProfessionDescriptionPanel()
-JPanel createProfessionSkillCostPanel()
-JPanel createProfessionalSkillsPanel()
-JPanel createButtonsPanel()
+List<Skill> getProfessionalSkill()
+void setProfessionalSkill(List<Skill> professionalSkill)
+JTextArea getProfessionDescription()
+ void setProfessionDescription(JTextArea professionDescription)
+List<Profession> getProfessionJList()
+void setProfessionJList(List<Profession> professionList)
+ List<SkillCategory> getSkillAndCostList()
+void setSkillAndCostList(List<SkillCategory> skillAndCostList)
+JLabel getTitle()
+void setTitle(JLabel title)
+void returnToCharacterName(ActionListener actionListener)
+void saveAndContinueToRace(ActionListener actionListener)
+ void updateSkillAndCostList(Profession profession)
+void updateProfessionalSkills(Profession profession)
+void updateProfessionSkillCostPanel()
+void updateProfessionalSkillsPanel()
-createTopPanel()
-createLeftPanel()
-createRightPanel()
-createRightTopPanel()
-createRightTopLeftPanel()
-createRightTopRightPanel()
-createRightBottomPanel()
-createBottomPanel()

}
}
CharacterSheetView *-- CharacterInfoView
CharacterSheetView *-- PrimaryStatsView
CharacterSheetView *-- MovementView
CharacterSheetView *-- WeaponAttackSetupView
CharacterSheetView *-- DefenseView
InventoryView o-- MagicItemsView
InventoryView o-- GeneralEquipmentView


package models{
    Class CharacterSheet{
        - int level;
        - int xp
        - String name
        - String background;
        # Culture culture;
        # Race race;
        # Profession profession;
        # PrimaryStats stats;
        # Defense defense;
        # ManeuversMovementAndEncumbrance MME;
        # Inventory inventory;
        # Map SkillList <String, Skill>;
        # Map SpellList <String, Spell>;
        # Set <TalentsAndFlaws> TalentsAndFlaws;
        +CharacterSheet(){}
        +CharacterSheet(int level, int xp, String name, String background, Culture culture, Race race, Profession profession, PrimaryStats stats, Defense defense, ManeuversMovementAndEncumbrance MME, Inventory inventory, Map skillList, Map spellList, Set<TalentsAndFlaws> talentsAndFLaws)
        +String getName()
        +void setName()
        +void setStat(String statName,int[]values)
        +void setStats(List<int[]>liste)
        +String getBackground()
        +void setBackground(String background)
        +Culture getCulture()
        +void setCulture(Culture culture)
        +Defense getDefense()
        +void setDefense(Defense defense)
        +Inventory getInventory()
        +void setInventory(Inventory inventory)
        +int getLevel()
        +void setLevel(int level)
        +ManeuversMovementAndEncumbrance getMME()
        +void setMME(ManeuversMovementAndEncumbrance MME)
        +Profession getProfession()
        +void setProfession(Profession profession)
        +Race getRace()
        +void setRace(Race race)
        +Map<String, SkillCategory> getSkillList()
        +void setSkillList(Map<String, SkillCategory> skillList)
        +Map<String, Spell> getSpellList()
        +void setSpellList(Map<String, Spell> spellList)
        +PrimaryStats getStats()
        + void setStats(PrimaryStats stats)
        +Set<TalentsAndFlaws> getTalentsAndFLaws()
        +void setTalentsAndFLaws(Set<TalentsAndFlaws> talentsAndFLaws)
        +int getXp()
        +void setXp(int xp)
        +Stat getStat(String statName)



       }
    Class GeneralEquipment{}

    Class Skill{
    -String name;
    -int firstCost;
    -int secondCost;
    +Skill()
    +String getName()
    +void setName(String name)
    -boolean proffesionalSkill
    -String name
    -String specialization
    -int cultureRanks
    -String stats
    -int statBonus
    -int totalRanks
    -int rankBonus
    -int proffesionalBonus
    -int knack
    -int totalBonus
    -boolean firstRankBought
    -boolean secondRankBought
    }
    Class SkillCategory{
        #String name
        #String[] stats
        #int DPCostFirst
        #int DPCostSecond
        #Map<String,Skill> skillList
        +SkillCategory(String name)
        +SkillCategory(String name,String[] stats)
        +SkillCategory(String name,String[]stats,int DPCostFirst,int DPCostSecond, Map<String,Skill> skillList)
        +String getName()
        +String[] getStats()
        +int getDPcostFirst()
        +int getDPcostSedond()
        +Map<String, Skill> getSkills()
        +void addSkill()
    }
    Class Spell{
        -list<String>category<>
        -boolean proffesionalSkill
        -String name
        -String specialization
        -int cultureRanks
        -String stats
        -int statBonus
        -int totalRanks
        -int rankBonus
        -int proffesionalBonus
        -int knack
        -int totalBonus
        -boolean firstRankBought
        -boolean secondRankBought
    }
    Class SpellCategory{
        #String name
        #String stats
        #int statBonus
        #int DPCostFirst
        #int DPCostSecond
        Map<String, Spell> spellList
        +SpellCategory(String name)
        +SpellCategory(String name, String[] stats, int DPCostFirst, int DPCostSecond, Map<String, Spell> spellList)
        +String getName()
        +String[] getStats()
        +int getDPCostFirst()
        +int getDPCostSecond()
        +Map<String, Spell> getSkills()
        +void addSpell()
    }
    Class Inventory{}

    Class MME{
        # Map<String,Pace> paces
        # Map<String,double> featsOfStrength
        # String size
        # double wtAllowance
        # double carried
        # double encPenalty
        # double maxPace
        # double totalManeuverPenalty
        # double bmr
        # int initiative
        # int hitPoints
        # int endurance
        # int power
    }
    Class Pace {
        # String name
        # double prRound
        # double prPhase
        # String penaltyAp
        # String loadLimit
    }
    Class PrimaryStats{
     # Stat agility;
     # Stat constitution;
     # Stat empathy;
     # Stat intuition;
     # Stat memory;
     # Stat presence;
     # Stat quickness;
     # Stat reasoning;
     # Stat selfDiscipline;
     # Stat strength;
     +PrimaryStats()
     +void setStat(String statNavn, int[] values)
     +void setStats(List<int[]> stats)
     +Stat getStat(String statName)
    }
    Class Defense{}

    Class MagicItems{}

    Class Race{
    - String race
    - int bonusDps;
    - int agility;
    - int constitution;
    - int empathy;
    - int intuition;
    - int memory;
    - int presence;
    - int quickness;
    - int reasoning;
    - int selfDisc;
    - int strength;
    - int channeling;
    - int essence;
    - int mentalism;
    - int physical;
    - int endurance;
    - int baseHits;
    - int recoveryMult;
    + getBonusDps();
    + getAgility();
    + getConstitution();
    + getEmpathy();
    + getIntuition();
    + getMemory();
    + getPresence();
    + getQuickness();
    + getReasoning();
    + getSelfDisc();
    + getStrength();
    + getChanneling();
    + getEssence();
    + getMentalism();
    + getPhysical();
    + getEndurance();
    + getBaseHits();
    + getRecoveryMult();
    + getRaceBonus(String statName);

    }
    Class Culture{
    - String cultureName
    - Map <String, Integer> skillMap;
    +Culture(String cultureName, Map<String, Integer> skillMap)
    +String getCultureName()
    + Map<String, Integer> getSkillMap()
    + getSkillMap();
    }
    Class Profession{
    #String name;
    #String description;
    #Map<String, List<Integer>> professionSkillCost;
    #List<String> availableRealms;
    #List<Skill> availableProfessionalSkillList;
    #Map<String, List<Spell>> professionSpell;
    #List<Skill> chosenProfessionalSkills;
    #List<Skill> chosenKnacks;
    #protected List<Skill> chosenRealms;
    +Profession(String name, String description, Map<String, List<Integer>> professionSkillCost, List<String> realms, List<Skill> availableProfessionalSkillList)
    + Map<String, List<Integer>> getSkillCost()
    +List<Skill> getProfessionalSkill()
    +Map<String, List<Integer>> getProfessionSkillCost()
    +List<String> getAvailableRealms()
    +Map<String, List<Spell>> getSpellList()
    +String getName()
    +String getDescription()
    +List<Skill> getChosenProfessionalSkills()
    +List<Skill> getChosenKnacks()
    +List<Skill> getChosenRealms()
    }
    Class TalentsAndFlaws{
    -String name;
    -String description;
    +TalentsAndFlaws()
    +TalentsAndFlaws(String name, String description)
    +String getName()
    +String getDescription()
    +void setName(String name)
    +void setDescription(String description)
    }
    Class Stat{
        - String name
        - int potentional
        - int temp
        + Stat(String name)
        # int bonus()
        # int racial()
        # int special()
        # int getTotal()
        #int getRaceBonus()
        +void setStat(int[] stat)
        + int getPotentional()
        + getTemp()
    }
}

CharacterSheet *-- PrimaryStats
CharacterSheet *-- MME
CharacterSheet *-- Defense
Inventory o-- MagicItems
Inventory o-- GeneralEquipment
CharacterSheet *-- TalentsAndFlaws
CharacterSheet *-- SkillCategory
SkillCategory *-- Skill
CharacterSheet *-- SpellCategory
SpellCategory *-- Spell
CharacterSheet *-- Inventory
CharacterSheet *-- Race
CharacterSheet *-- Culture
CharacterSheet *-- Profession
PrimaryStats *-- Stat


package util {
    Class FileIO{}
    Class TextUI{}
    Class dataLoader{}
    Class parseJson
}

Main *--- RoleMaster
RoleMaster *-- CharacterSheet
RoleMaster *-- views
RoleMaster *-- Dice
RoleMaster *-- util
RoleMaster *-- Rules
@enduml

implements ..|>
extends <|-- (is-a)
composition *-- (must-have)
Aggregation o-- (can-have)
Associering <--