diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..097f9f9
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,9 @@
+#
+# https://help.github.com/articles/dealing-with-line-endings/
+#
+# Linux start script should use lf
+/gradlew text eol=lf
+
+# These are Windows script files and should use crlf
+*.bat text eol=crlf
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1b6985c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+# Ignore Gradle project-specific cache directory
+.gradle
+
+# Ignore Gradle build output directory
+build
diff --git a/.project b/.project
new file mode 100644
index 0000000..42cb056
--- /dev/null
+++ b/.project
@@ -0,0 +1,28 @@
+
+
+ dnd
+ Project dnd created by Buildship.
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectnature
+
+
+
+ 1682969422633
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
+
diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000..f093f85
--- /dev/null
+++ b/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,13 @@
+arguments=--init-script /Users/jashton/.cache/jdtls/config/org.eclipse.osgi/50/0/.cp/gradle/init/init.gradle
+auto.sync=false
+build.scans.enabled=false
+connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
+connection.project.dir=
+eclipse.preferences.version=1
+gradle.user.home=
+java.home=/opt/homebrew/Cellar/openjdk/20/libexec/openjdk.jdk/Contents/Home
+jvm.arguments=
+offline.mode=false
+override.workspace.settings=true
+show.console.view=true
+show.executions.view=true
diff --git a/app/.classpath b/app/.classpath
new file mode 100644
index 0000000..be377dd
--- /dev/null
+++ b/app/.classpath
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/.project b/app/.project
new file mode 100644
index 0000000..b0cd83e
--- /dev/null
+++ b/app/.project
@@ -0,0 +1,34 @@
+
+
+ app
+ Project app created by Buildship.
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.buildship.core.gradleprojectbuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.buildship.core.gradleprojectnature
+
+
+
+ 1682969422631
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
+
diff --git a/app/.settings/org.eclipse.buildship.core.prefs b/app/.settings/org.eclipse.buildship.core.prefs
new file mode 100644
index 0000000..b1886ad
--- /dev/null
+++ b/app/.settings/org.eclipse.buildship.core.prefs
@@ -0,0 +1,2 @@
+connection.project.dir=..
+eclipse.preferences.version=1
diff --git a/app/.settings/org.eclipse.jdt.core.prefs b/app/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..626e0e1
--- /dev/null
+++ b/app/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.source=17
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..bfadd0b
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,45 @@
+/*
+ * This file was generated by the Gradle 'init' task.
+ *
+ * This generated file contains a sample Java application project to get you started.
+ * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
+ * User Manual available at https://docs.gradle.org/8.1.1/userguide/building_java_projects.html
+ * This project uses @Incubating APIs which are subject to change.
+ */
+
+plugins {
+ // Apply the application plugin to add support for building a CLI application in Java.
+ id 'application'
+}
+
+repositories {
+ // Use Maven Central for resolving dependencies.
+ mavenCentral()
+}
+
+dependencies {
+ // This dependency is used by the application.
+ implementation 'com.google.guava:guava:31.1-jre'
+}
+
+testing {
+ suites {
+ // Configure the built-in test suite
+ test {
+ // Use JUnit Jupiter test framework
+ useJUnitJupiter('5.9.1')
+ }
+ }
+}
+
+// Apply a specific Java toolchain to ease working on different environments.
+java {
+ toolchain {
+ languageVersion = JavaLanguageVersion.of(17)
+ }
+}
+
+application {
+ // Define the main class for the application.
+ mainClass = 'dnd.App'
+}
diff --git a/src/App.java b/app/src/main/java/dnd/App.java
similarity index 92%
rename from src/App.java
rename to app/src/main/java/dnd/App.java
index 8e2f763..2402065 100644
--- a/src/App.java
+++ b/app/src/main/java/dnd/App.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public class App {
diff --git a/src/AppConstants.java b/app/src/main/java/dnd/AppConstants.java
similarity index 89%
rename from src/AppConstants.java
rename to app/src/main/java/dnd/AppConstants.java
index 2c1924f..eac09a0 100644
--- a/src/AppConstants.java
+++ b/app/src/main/java/dnd/AppConstants.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.awt.*;
@@ -12,11 +12,11 @@ public final class AppConstants {
public static final String mainFilepath = System.getProperty("user.dir");
- public static final String imgFilepath = System.getProperty("user.dir") + "/.resources/img/";
+ public static final String imgFilepath = System.getProperty("user.dir") + "/src/main/resources/img/";
- public static final String fontFilepath = System.getProperty("user.dir") + "/.resources/SanSalvi.ttf";
+ public static final String fontFilepath = System.getProperty("user.dir") + "/src/main/resources/SanSalvi.ttf";
- public static final String savesFilepath = System.getProperty("user.dir") + "/.savedSheets/";
+ public static final String savesFilepath = System.getProperty("user.home") + "/Documents/saves";
diff --git a/src/Background.java b/app/src/main/java/dnd/Background.java
similarity index 99%
rename from src/Background.java
rename to app/src/main/java/dnd/Background.java
index c3415e2..ef0b9fd 100644
--- a/src/Background.java
+++ b/app/src/main/java/dnd/Background.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public class Background {
diff --git a/src/BasicNavPanel.java b/app/src/main/java/dnd/BasicNavPanel.java
similarity index 97%
rename from src/BasicNavPanel.java
rename to app/src/main/java/dnd/BasicNavPanel.java
index beed543..0b2df6f 100644
--- a/src/BasicNavPanel.java
+++ b/app/src/main/java/dnd/BasicNavPanel.java
@@ -1,11 +1,11 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import java.awt.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class BasicNavPanel extends JPanel {
diff --git a/src/BasicPanel.java b/app/src/main/java/dnd/BasicPanel.java
similarity index 97%
rename from src/BasicPanel.java
rename to app/src/main/java/dnd/BasicPanel.java
index ebfb50d..9fec990 100644
--- a/src/BasicPanel.java
+++ b/app/src/main/java/dnd/BasicPanel.java
@@ -1,10 +1,10 @@
-package src;
+package dnd;
import javax.swing.*;
import java.awt.*;
-import static src.AppConstants.*;
-import static src.ImageManager.*;
+import static dnd.AppConstants.*;
+import static dnd.ImageManager.*;
public class BasicPanel extends JPanel {
diff --git a/src/CharacterSheet.java b/app/src/main/java/dnd/CharacterSheet.java
similarity index 98%
rename from src/CharacterSheet.java
rename to app/src/main/java/dnd/CharacterSheet.java
index 02eacb9..e1c768d 100644
--- a/src/CharacterSheet.java
+++ b/app/src/main/java/dnd/CharacterSheet.java
@@ -1,6 +1,7 @@
-package src;
+package dnd;
import java.io.Serializable;
+import dnd.species.*;
public class CharacterSheet implements Serializable {
private String name;
diff --git a/src/CharacterStats.java b/app/src/main/java/dnd/CharacterStats.java
similarity index 99%
rename from src/CharacterStats.java
rename to app/src/main/java/dnd/CharacterStats.java
index 0fcbea6..64be5c2 100644
--- a/src/CharacterStats.java
+++ b/app/src/main/java/dnd/CharacterStats.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/Charisma.java b/app/src/main/java/dnd/Charisma.java
similarity index 98%
rename from src/Charisma.java
rename to app/src/main/java/dnd/Charisma.java
index 2046406..3dc054c 100644
--- a/src/Charisma.java
+++ b/app/src/main/java/dnd/Charisma.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/ChooseAbilityScoresPanel.java b/app/src/main/java/dnd/ChooseAbilityScoresPanel.java
similarity index 99%
rename from src/ChooseAbilityScoresPanel.java
rename to app/src/main/java/dnd/ChooseAbilityScoresPanel.java
index 1a156d0..be9bc3f 100644
--- a/src/ChooseAbilityScoresPanel.java
+++ b/app/src/main/java/dnd/ChooseAbilityScoresPanel.java
@@ -1,10 +1,10 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.LineBorder;
import java.awt.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class ChooseAbilityScoresPanel extends JPanel {
diff --git a/src/ClassTemplate.java b/app/src/main/java/dnd/ClassTemplate.java
similarity index 98%
rename from src/ClassTemplate.java
rename to app/src/main/java/dnd/ClassTemplate.java
index ae285c2..4c83317 100644
--- a/src/ClassTemplate.java
+++ b/app/src/main/java/dnd/ClassTemplate.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public interface ClassTemplate {
diff --git a/src/Cleric.java b/app/src/main/java/dnd/Cleric.java
similarity index 99%
rename from src/Cleric.java
rename to app/src/main/java/dnd/Cleric.java
index 8dc0772..4d6a824 100644
--- a/src/Cleric.java
+++ b/app/src/main/java/dnd/Cleric.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public class Cleric implements ClassTemplate {
diff --git a/src/Constitution.java b/app/src/main/java/dnd/Constitution.java
similarity index 98%
rename from src/Constitution.java
rename to app/src/main/java/dnd/Constitution.java
index ab5d2e0..ce88d73 100644
--- a/src/Constitution.java
+++ b/app/src/main/java/dnd/Constitution.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/DefaultButton.java b/app/src/main/java/dnd/DefaultButton.java
similarity index 97%
rename from src/DefaultButton.java
rename to app/src/main/java/dnd/DefaultButton.java
index 53ea56a..1cca831 100644
--- a/src/DefaultButton.java
+++ b/app/src/main/java/dnd/DefaultButton.java
@@ -1,11 +1,11 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class DefaultButton extends JButton {
diff --git a/src/DescriptionPanel.java b/app/src/main/java/dnd/DescriptionPanel.java
similarity index 99%
rename from src/DescriptionPanel.java
rename to app/src/main/java/dnd/DescriptionPanel.java
index 8534a6e..3cc8cab 100644
--- a/src/DescriptionPanel.java
+++ b/app/src/main/java/dnd/DescriptionPanel.java
@@ -1,10 +1,10 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class DescriptionPanel extends JPanel {
diff --git a/src/Dexterity.java b/app/src/main/java/dnd/Dexterity.java
similarity index 98%
rename from src/Dexterity.java
rename to app/src/main/java/dnd/Dexterity.java
index fd7f4b8..94a9db1 100644
--- a/src/Dexterity.java
+++ b/app/src/main/java/dnd/Dexterity.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/DieRoller/DiceRoller.java b/app/src/main/java/dnd/DieRoller/DiceRoller.java
similarity index 99%
rename from src/DieRoller/DiceRoller.java
rename to app/src/main/java/dnd/DieRoller/DiceRoller.java
index 08583ee..af053b2 100644
--- a/src/DieRoller/DiceRoller.java
+++ b/app/src/main/java/dnd/DieRoller/DiceRoller.java
@@ -2,7 +2,7 @@
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Character.Classes/Main.java to edit this template
*/
-package DieRoller;
+package dnd.DieRoller;
import javax.swing.*;
import java.util.Arrays;
diff --git a/src/Fighter.java b/app/src/main/java/dnd/Fighter.java
similarity index 99%
rename from src/Fighter.java
rename to app/src/main/java/dnd/Fighter.java
index 80354eb..921dfc8 100644
--- a/src/Fighter.java
+++ b/app/src/main/java/dnd/Fighter.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/FileManager.java b/app/src/main/java/dnd/FileManager.java
similarity index 89%
rename from src/FileManager.java
rename to app/src/main/java/dnd/FileManager.java
index 1855790..7b07445 100644
--- a/src/FileManager.java
+++ b/app/src/main/java/dnd/FileManager.java
@@ -1,57 +1,41 @@
-package src;
+package dnd;
import java.awt.*;
import java.io.*;
import java.util.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class FileManager {
-
private String filepath;
private boolean returningUser;
-
private ArrayList saveFiles;
private ArrayList saves;
public FileManager() {
-
saveFiles = new ArrayList<>();
-
setSaveFiles();
-
loadFont();
-
}
public int getNumSaves() {
-
return saveFiles.size();
-
}
public boolean isReturningUser() {
-
return returningUser;
-
}
public CharacterSheet readSavedCharacter(int index) {
-
return readCharacter(saveFiles.get(index));
-
}
public void saveCharacter(CharacterSheet completedCharacter) {
-
writeCharacter(completedCharacter);
-
}
public ArrayList getSaves() {
-
return saves;
-
}
// TODO: Need to implement.
@@ -60,100 +44,57 @@ public class FileManager {
}
private void loadFont() {
-
try {
-
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
-
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(fontFilepath)));
-
} catch(IOException | FontFormatException e) {
-
System.out.println("Filepath of font not found: " + fontFilepath + " does not exist.");
-
}
-
}
private void setSaveFiles() {
-
File[] tmp = new File(savesFilepath).listFiles();
-
if(tmp != null) {
-
for(int i = 0; i < tmp.length; i++) {
-
saveFiles.add(tmp[i]);
-
}
-
returningUser = true;
-
} else {
-
returningUser = false;
-
}
saves = new ArrayList<>();
-
for(File file : saveFiles) {
-
saves.add(readCharacter(file));
-
}
-
}
private CharacterSheet readCharacter(File file) {
-
CharacterSheet sheet = null;
-
try {
-
FileInputStream fileIn = new FileInputStream(file.getPath());
-
ObjectInputStream in = new ObjectInputStream(fileIn);
-
sheet = (CharacterSheet) in.readObject();
-
in.close();
fileIn.close();
-
} catch (IOException | ClassNotFoundException e) {
-
System.out.println("No saved characters were found");
-
}
-
return sheet;
-
}
private void writeCharacter(CharacterSheet sheet) {
-
try(
-
- FileOutputStream fileOut = new FileOutputStream(savesFilepath + sheet.getName() + ".dnd");
-
- ObjectOutputStream objOut = new ObjectOutputStream(fileOut);
-
+ FileOutputStream fileOut = new FileOutputStream(savesFilepath + sheet.getName() + ".dnd");
+ ObjectOutputStream objOut = new ObjectOutputStream(fileOut);
) {
objOut.writeObject(sheet);
-
setSaveFiles();
-
} catch (IOException e) {
-
System.out.println("ERROR: ");
-
e.printStackTrace();
-
System.out.println("\nERROR: Unable to write character sheet object to \n" + filepath + "/.savedSheets");
-
}
-
}
-
}
diff --git a/src/GUImanager.java b/app/src/main/java/dnd/GUImanager.java
similarity index 95%
rename from src/GUImanager.java
rename to app/src/main/java/dnd/GUImanager.java
index 4f20712..89231ad 100644
--- a/src/GUImanager.java
+++ b/app/src/main/java/dnd/GUImanager.java
@@ -1,10 +1,11 @@
-package src;
+package dnd;
import javax.swing.*;
import java.awt.*;
import java.util.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
+import dnd.species.*;
public class GUImanager extends JFrame {
@@ -163,7 +164,7 @@ public class GUImanager extends JFrame {
"A Strength check can model any attempt to lift, push, pull, or break something, to force your body through a space, or to otherwise apply brute force to a situation. You add your Strength modifier to your attack roll and your damage roll when attacking with a melee weapon Skills: Athletics",
"A Dexterity check can model any attempt to move nimbly, quickly, or quietly, or to keep from falling on tricky footing. You add your Dexterity modifier to your attack roll and your damage roll when attacking with a ranged weapon, or a melee weapon that has the finesse property. Skills: Acrobatics, Sleight of Hand, Stealth",
- "CConstitution checks are uncommon, and no skills apply to Constitution checks, because the endurance this ability represents is largely passive rather than involving a specific effort on the part of a character or monster. A Constitution check can model your attempt to push beyond normal limits, however. Your Constitution modifier contributes to your hit points. Typically, you add your Constitution modifier to each Hit Die you roll for your hit points.",
+ "Constitution checks are uncommon, and no skills apply to Constitution checks, because the endurance this ability represents is largely passive rather than involving a specific effort on the part of a character or monster. A Constitution check can model your attempt to push beyond normal limits, however. Your Constitution modifier contributes to your hit points. Typically, you add your Constitution modifier to each Hit Die you roll for your hit points.",
"An Intelligence check comes into play when you need to draw on logic, education, memory, or deductive reasoning. Skills: Arcana, History, Investigation, Nature, Religion",
"A Wisdom check might reflect an effort to read body language, understand someone’s feelings, notice things about the environment, or care for an injured person. Skills: Animal Handling, Insight, Medicine, Perception, Survival",
"A Charisma check might arise when you try to influence or entertain others, when you try to make an impression or tell a convincing lie, or when you are navigating a tricky social situation. Skills: Deception, Intimidation, Performance, Persuasion"
@@ -236,60 +237,41 @@ public class GUImanager extends JFrame {
backgroundDescriptions = new String[]{
//Acolyte
- "You have spent your life in the service of a temple to a specific god or pantheon of gods. You act as an intermediary between the realm of the holy and the mortal world, performing sacred rites and offering sacrifices in order to conduct worshipers into the presence of the divine. You are not necessarily a cleric—performing sacred rites is not the same thing as channeling divine power. Feature: Shelter of the Faithful Proficiencies: Insight, Religion
-",
+ "You have spent your life in the service of a temple to a specific god or pantheon of gods. You act as an intermediary between the realm of the holy and the mortal world, performing sacred rites and offering sacrifices in order to conduct worshipers into the presence of the divine. You are not necessarily a cleric—performing sacred rites is not the same thing as channeling divine power. Feature: Shelter of the Faithful Proficiencies: Insight, Religion",
//Charlatan
- "You have always had a way with people. You know what makes them tick, you can tease out their hearts’ desires after a few minutes of conversation, and with a few leading questions you can read them like they were children’s books. It’s a useful talent, and one that you’re perfectly willing to use for your advantage. Feature: False Identity Proficiencies: Deception, Sleight of Hand
-",
+ "You have always had a way with people. You know what makes them tick, you can tease out their hearts’ desires after a few minutes of conversation, and with a few leading questions you can read them like they were children’s books. It’s a useful talent, and one that you’re perfectly willing to use for your advantage. Feature: False Identity Proficiencies: Deception, Sleight of Hand",
//Criminal
- "You are an experienced criminal with a history of breaking the law. You have spent a lot of time among other criminals and still have contacts within the criminal underworld. You’re far closer than most people to the world of murder, theft, and violence that pervades the underbelly of civilization, and you have survived up to this point by flouting the rules and regulations of society. Feature: Criminal Contact Proficiencies: Deception, Stealth
-",
+ "You are an experienced criminal with a history of breaking the law. You have spent a lot of time among other criminals and still have contacts within the criminal underworld. You’re far closer than most people to the world of murder, theft, and violence that pervades the underbelly of civilization, and you have survived up to this point by flouting the rules and regulations of society. Feature: Criminal Contact Proficiencies: Deception, Stealth",
//Entertainer
- "You thrive in front of an audience. You know how to entrance them, entertain them, and even inspire them. Your poetics can stir the hearts of those who hear you, awakening grief or joy, laughter or anger. Your music raises their spirits or captures their sorrow. Your dance steps captivate, your humor cuts to the quick. Whatever techniques you use, your art is your life. Feature: By Popular Demand Proficiencies: Acrobatics, Performance
-",
+ "You thrive in front of an audience. You know how to entrance them, entertain them, and even inspire them. Your poetics can stir the hearts of those who hear you, awakening grief or joy, laughter or anger. Your music raises their spirits or captures their sorrow. Your dance steps captivate, your humor cuts to the quick. Whatever techniques you use, your art is your life. Feature: By Popular Demand Proficiencies: Acrobatics, Performance",
//Folk Hero
- "You come from a humble social rank, but you are destined for so much more. Already the people of your home village regard you as their champion, and your destiny calls you to stand against the tyrants and monsters that threaten the common folk everywhere. Feature: Rustic Hospitality Proficiencies: Animal Handling, Survival
-",
+ "You come from a humble social rank, but you are destined for so much more. Already the people of your home village regard you as their champion, and your destiny calls you to stand against the tyrants and monsters that threaten the common folk everywhere. Feature: Rustic Hospitality Proficiencies: Animal Handling, Survival",
//Gladiator
- "A gladiator is as much an entertainer as any minstrel or circus performer, trained to make the arts of combat into a spectacle the crowd can enjoy. This kind of flashy combat is your entertainer routine, though you might also have some skills as a tumbler or actor. Feature: By Popular Demand Proficiencies: Acrobatics, Performance
-",
+ "A gladiator is as much an entertainer as any minstrel or circus performer, trained to make the arts of combat into a spectacle the crowd can enjoy. This kind of flashy combat is your entertainer routine, though you might also have some skills as a tumbler or actor. Feature: By Popular Demand Proficiencies: Acrobatics, Performance",
//Guild Artisan
- "You are a member of an artisan’s guild, skilled in a particular field and closely associated with other artisans. You are a well-established part of the mercantile world, freed by talent and wealth from the constraints of a feudal social order. You learned your skills as an apprentice to a master artisan, under the sponsorship of your guild, until you became a master in your own right. Feature: Guild Membership Proficiencies: Insight, Persuasion
-",
+ "You are a member of an artisan’s guild, skilled in a particular field and closely associated with other artisans. You are a well-established part of the mercantile world, freed by talent and wealth from the constraints of a feudal social order. You learned your skills as an apprentice to a master artisan, under the sponsorship of your guild, until you became a master in your own right. Feature: Guild Membership Proficiencies: Insight, Persuasion",
//Guild Merchant
- "Instead of an artisans’ guild, you might belong to a guild of traders, caravan masters, or shopkeepers. You don’t craft items yourself but earn a living by buying and selling the works of others (or the raw materials artisans need to practice their craft). Your guild might be a large merchant consortium (or family) with interests across the region. Perhaps you transported goods from one place to another, by ship, wagon, or caravan, or bought them from traveling traders and sold them in your own little shop. In some ways, the traveling merchant’s life lends itself to adventure far more than the life of an artisan. Feature: Guild Membership Proficiencies: Insight, Persuasion
-",
+ "Instead of an artisans’ guild, you might belong to a guild of traders, caravan masters, or shopkeepers. You don’t craft items yourself but earn a living by buying and selling the works of others (or the raw materials artisans need to practice their craft). Your guild might be a large merchant consortium (or family) with interests across the region. Perhaps you transported goods from one place to another, by ship, wagon, or caravan, or bought them from traveling traders and sold them in your own little shop. In some ways, the traveling merchant’s life lends itself to adventure far more than the life of an artisan. Feature: Guild Membership Proficiencies: Insight, Persuasion",
//Hermit
- "You lived in seclusion — either in a sheltered community such as a monastery, or entirely alone — for a formative part of your life. In your time apart from the clamor of society, you found quiet, solitude, and perhaps some of the answers you were looking for. Feature: Discovery Proficiencies: Medicine, Religion
-",
+ "You lived in seclusion — either in a sheltered community such as a monastery, or entirely alone — for a formative part of your life. In your time apart from the clamor of society, you found quiet, solitude, and perhaps some of the answers you were looking for. Feature: Discovery Proficiencies: Medicine, Religion",
//Knight
- "A knighthood is among the lowest noble titles in most societies, but it can be a path to higher status. One of your commoner retainers is a noble who serves as your squire, aiding you in exchange for training on his or her own path to knighthood. Your two remaining retainers might include a groom to care for your horse and a servant who polishes your armor (and even helps you put it on). Feature: Retainers Proficiencies: History, Persuasion
-",
+ "A knighthood is among the lowest noble titles in most societies, but it can be a path to higher status. One of your commoner retainers is a noble who serves as your squire, aiding you in exchange for training on his or her own path to knighthood. Your two remaining retainers might include a groom to care for your horse and a servant who polishes your armor (and even helps you put it on). Feature: Retainers Proficiencies: History, Persuasion",
//Noble
- "You understand wealth, power, and privilege. You carry a noble title, and your family owns land, collects taxes, and wields significant political influence. You might be a pampered aristocrat unfamiliar with work or discomfort, a former merchant just elevated to the nobility, or a disinherited scoundrel with a disproportionate sense of entitlement. Or you could be an honest, hard-working landowner who cares deeply about the people who live and work on your land, keenly aware of your responsibility to them. Feature: Position of Privilege Proficiencies: History, Persuasion
-",
+ "You understand wealth, power, and privilege. You carry a noble title, and your family owns land, collects taxes, and wields significant political influence. You might be a pampered aristocrat unfamiliar with work or discomfort, a former merchant just elevated to the nobility, or a disinherited scoundrel with a disproportionate sense of entitlement. Or you could be an honest, hard-working landowner who cares deeply about the people who live and work on your land, keenly aware of your responsibility to them. Feature: Position of Privilege Proficiencies: History, Persuasion",
//Outlander
- "You grew up in the wilds, far from civilization and the comforts of town and technology. You’ve witnessed the migration of herds larger than forests, survived weather more extreme than any city-dweller could comprehend, and enjoyed the solitude of being the only thinking creature for miles in any direction. The wilds are in your blood, whether you were a nomad, an explorer, a recluse, a hunter-gatherer, or even a marauder. Even in places where you don’t know the specific features of the terrain, you know the ways of the wild. Feature: Wanderer Proficiencies: Athletics, Survival
-",
+ "You grew up in the wilds, far from civilization and the comforts of town and technology. You’ve witnessed the migration of herds larger than forests, survived weather more extreme than any city-dweller could comprehend, and enjoyed the solitude of being the only thinking creature for miles in any direction. The wilds are in your blood, whether you were a nomad, an explorer, a recluse, a hunter-gatherer, or even a marauder. Even in places where you don’t know the specific features of the terrain, you know the ways of the wild. Feature: Wanderer Proficiencies: Athletics, Survival",
//Pirate
- "You spent your youth under the sway of a dread pirate, a ruthless cutthroat who taught you how to survive in a world of sharks and lawlessness. You’ve indulged in larceny on the high seas and sent more than one deserving soul to a briny grave. Fear and bloodshed are no strangers to you, and you’ve garnered a somewhat unsavory reputation in many a port town. Feature: Bad Reputation Proficiencies: Athletics, Perception
-",
+ "You spent your youth under the sway of a dread pirate, a ruthless cutthroat who taught you how to survive in a world of sharks and lawlessness. You’ve indulged in larceny on the high seas and sent more than one deserving soul to a briny grave. Fear and bloodshed are no strangers to you, and you’ve garnered a somewhat unsavory reputation in many a port town. Feature: Bad Reputation Proficiencies: Athletics, Perception",
//Sage
- "You spent years learning the lore of the multiverse. You scoured manuscripts, studied scrolls, and listened to the greatest experts on the subjects that interest you. Your efforts have made you a master in your fields of study. Feature: Researcher Proficiencies: Arcana, History
-",
+ "You spent years learning the lore of the multiverse. You scoured manuscripts, studied scrolls, and listened to the greatest experts on the subjects that interest you. Your efforts have made you a master in your fields of study. Feature: Researcher Proficiencies: Arcana, History",
//Sailer
- "You sailed on a seagoing vessel for years. In that time, you faced down mighty storms, monsters of the deep, and those who wanted to sink your craft to the bottomless depths. Your first love is the distant line of the horizon, but the time has come to try your hand at something new. Feature: Ship's Passage Proficiencies: Athletics, Perception
-",
+ "You sailed on a seagoing vessel for years. In that time, you faced down mighty storms, monsters of the deep, and those who wanted to sink your craft to the bottomless depths. Your first love is the distant line of the horizon, but the time has come to try your hand at something new. Feature: Ship's Passage Proficiencies: Athletics, Perception",
//Soldier
- "War has been your life for as long as you care to remember. You trained as a youth, studied the use of weapons and armor, learned basic survival techniques, including how to stay alive on the battlefield. You might have been part of a standing national army or a mercenary company, or perhaps a member of a local militia who rose to prominence during a recent war. Feature: Military Rank Proficiencies: Athletics, Intimidation
-
-",
+ "War has been your life for as long as you care to remember. You trained as a youth, studied the use of weapons and armor, learned basic survival techniques, including how to stay alive on the battlefield. You might have been part of a standing national army or a mercenary company, or perhaps a member of a local militia who rose to prominence during a recent war. Feature: Military Rank Proficiencies: Athletics, Intimidation",
//Spy
- "Although your capabilities are not much different from those of a burglar or smuggler, you learned and practiced them in a very different context: as an espionage agent. You might have been an officially sanctioned agent of the crown, or perhaps you sold the secrets you uncovered to the highest bidder. Feature: Criminal Contact Proficiencies: Deception, Stealth
-",
+ "Although your capabilities are not much different from those of a burglar or smuggler, you learned and practiced them in a very different context: as an espionage agent. You might have been an officially sanctioned agent of the crown, or perhaps you sold the secrets you uncovered to the highest bidder. Feature: Criminal Contact Proficiencies: Deception, Stealth",
//Urchin
- "You grew up on the streets alone, orphaned, and poor. You had no one to watch over you or to provide for you, so you learned to provide for yourself. You fought fiercely over food and kept a constant watch out for other desperate souls who might steal from you. You slept on rooftops and in alleyways, exposed to the elements, and endured sickness without the advantage of medicine or a place to recuperate. You’ve survived despite all odds, and did so through cunning, strength, speed, or some combination of each. Feature: City Secrets Proficiencies: Sleight of Hand, Stealth
-"
+ "You grew up on the streets alone, orphaned, and poor. You had no one to watch over you or to provide for you, so you learned to provide for yourself. You fought fiercely over food and kept a constant watch out for other desperate souls who might steal from you. You slept on rooftops and in alleyways, exposed to the elements, and endured sickness without the advantage of medicine or a place to recuperate. You’ve survived despite all odds, and did so through cunning, strength, speed, or some combination of each. Feature: City Secrets Proficiencies: Sleight of Hand, Stealth"
};
}
@@ -490,22 +472,24 @@ public class GUImanager extends JFrame {
private DefaultButton createLoadNCharacterButton(int index) {
- DefaultButton button = new DefaultButton(saves.get(index).getName());
+ if(index < 0) return new DefaultButton("INDEX OUT OF BOUNDS");
- button.addActionListener(
+ DefaultButton button = new DefaultButton(saves.get(index).getName());
- e -> {
+ button.addActionListener(
- lastPanel = currentPanel;
- panels[6] = new ViewCharacterPanel(createBackPanel(), saves.get(index));
- currentPanel = 6;
- clearAndReset();
+ e -> {
- }
+ lastPanel = currentPanel;
+ panels[6] = new ViewCharacterPanel(createBackPanel(), saves.get(index));
+ currentPanel = 6;
+ clearAndReset();
- );
+ }
- return button;
+ );
+
+ return button;
}
diff --git a/src/ImageManager.java b/app/src/main/java/dnd/ImageManager.java
similarity index 83%
rename from src/ImageManager.java
rename to app/src/main/java/dnd/ImageManager.java
index 85a31aa..3ca8d06 100644
--- a/src/ImageManager.java
+++ b/app/src/main/java/dnd/ImageManager.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import javax.imageio.*;
import javax.swing.*;
@@ -7,16 +7,14 @@ import java.awt.image.*;
import java.io.*;
import java.util.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class ImageManager extends FileManager {
-
private static JLabel[][] racePortraits;
private static JLabel[][] classPortraits;
private static ArrayList savesPortraits;
public ImageManager() {
-
super();
racePortraits = new JLabel[9][];
classPortraits = new JLabel[12][];
@@ -29,88 +27,62 @@ public class ImageManager extends FileManager {
}
public JLabel getRacePortrait(int raceIndex) {
+ if(raceIndex < 1) return new JLabel();
- return racePortraits[raceIndex][new Random().nextInt(racePortraits[raceIndex].length)];
-
+ return racePortraits[raceIndex][new Random().nextInt(racePortraits[raceIndex].length)];
}
public JLabel getClassPortrait(int classIndex) {
+ if(classIndex < 1) return new JLabel();
- return classPortraits[classIndex][new Random().nextInt(classPortraits[classIndex].length)];
-
+ return classPortraits[classIndex][new Random().nextInt(classPortraits[classIndex].length)];
}
private void createSavesPortraits() {
-
File[] dir = new File(imgFilepath + "/saves/").listFiles();
-
for(File file : dir) {
-
JLabel holder = image(file);
holder.setOpaque(true);
holder.setBackground(lightBrown);
-
savesPortraits.add(holder);
-
}
-
}
private void createPortraitArray(JLabel[][] portraits, String category) {
-
- File imgDir = new File(imgFilepath + category + "/");
-
- File[] masterDir = imgDir.listFiles();
+ File imgDir = new File(imgFilepath + category + "/");
+ File[] masterDir = imgDir.listFiles();
for(int i = 0; i < portraits.length; i++) {
-
File[] tmpDir = masterDir[i].listFiles();
-
portraits[i] = new JLabel[tmpDir.length];
-
int index = 0;
-
for(File file : tmpDir) {
-
portraits[i][index] = image(file);
portraits[i][index].setOpaque(true);
portraits[i][index].setBackground(lightBrown);
//portraits[i][index].setBounds(bounds[3]);
-
index++;
-
}
-
}
-
}
private JLabel image(File file) {
-
BufferedImage img;
Image finalImg;
JLabel picture;
try {
-
img = ImageIO.read(file);
finalImg = img.getScaledInstance(250, 375, Image.SCALE_SMOOTH);
-
} catch (IOException e) {
-
System.out.println("File " + file.getPath() + " does not exist.");
img = null;
finalImg = null;
picture = null;
-
return null;
-
}
picture = new JLabel(new ImageIcon(finalImg));
-
return picture;
-
}
-
}
diff --git a/src/InfoPanel.java b/app/src/main/java/dnd/InfoPanel.java
similarity index 98%
rename from src/InfoPanel.java
rename to app/src/main/java/dnd/InfoPanel.java
index 87b073e..af2ab18 100644
--- a/src/InfoPanel.java
+++ b/app/src/main/java/dnd/InfoPanel.java
@@ -1,10 +1,10 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class InfoPanel extends JPanel {
diff --git a/src/Intelligence.java b/app/src/main/java/dnd/Intelligence.java
similarity index 98%
rename from src/Intelligence.java
rename to app/src/main/java/dnd/Intelligence.java
index 3bc0f25..362a325 100644
--- a/src/Intelligence.java
+++ b/app/src/main/java/dnd/Intelligence.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/LoadCharacter.java b/app/src/main/java/dnd/LoadCharacter.java
similarity index 99%
rename from src/LoadCharacter.java
rename to app/src/main/java/dnd/LoadCharacter.java
index 09661ea..28f3554 100644
--- a/src/LoadCharacter.java
+++ b/app/src/main/java/dnd/LoadCharacter.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import javax.swing.*;
import java.awt.*;
diff --git a/src/LoadCharacterPanel.java b/app/src/main/java/dnd/LoadCharacterPanel.java
similarity index 96%
rename from src/LoadCharacterPanel.java
rename to app/src/main/java/dnd/LoadCharacterPanel.java
index 7320817..02107ae 100644
--- a/src/LoadCharacterPanel.java
+++ b/app/src/main/java/dnd/LoadCharacterPanel.java
@@ -1,10 +1,10 @@
-package src;
+package dnd;
import javax.swing.*;
import java.awt.*;
import java.util.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class LoadCharacterPanel extends JPanel {
diff --git a/src/MainMenuPanel.java b/app/src/main/java/dnd/MainMenuPanel.java
similarity index 97%
rename from src/MainMenuPanel.java
rename to app/src/main/java/dnd/MainMenuPanel.java
index 1b481d5..50d367a 100644
--- a/src/MainMenuPanel.java
+++ b/app/src/main/java/dnd/MainMenuPanel.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import javax.swing.*;
import javax.swing.border.BevelBorder;
@@ -7,7 +7,7 @@ import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class MainMenuPanel extends JPanel {
diff --git a/src/Skills.java b/app/src/main/java/dnd/Skills.java
similarity index 99%
rename from src/Skills.java
rename to app/src/main/java/dnd/Skills.java
index e7bbc92..e981b04 100644
--- a/src/Skills.java
+++ b/app/src/main/java/dnd/Skills.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
/**
* Object stores information about a character's skills arrays. Firstly, the name of each skill, and secondly the value of each skill. When constructed, a private method is called
diff --git a/src/Stats.java b/app/src/main/java/dnd/Stats.java
similarity index 98%
rename from src/Stats.java
rename to app/src/main/java/dnd/Stats.java
index dc22fd8..0eb7245 100644
--- a/src/Stats.java
+++ b/app/src/main/java/dnd/Stats.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public abstract class Stats {
diff --git a/src/Strength.java b/app/src/main/java/dnd/Strength.java
similarity index 98%
rename from src/Strength.java
rename to app/src/main/java/dnd/Strength.java
index eded563..23ec22c 100644
--- a/src/Strength.java
+++ b/app/src/main/java/dnd/Strength.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/Tester.java b/app/src/main/java/dnd/Tester.java
similarity index 96%
rename from src/Tester.java
rename to app/src/main/java/dnd/Tester.java
index 32dc6ef..c1f29a3 100644
--- a/src/Tester.java
+++ b/app/src/main/java/dnd/Tester.java
@@ -1,5 +1,6 @@
-package src;
+package dnd;
+import dnd.species.*;
public class Tester {
public static void main(String[] args) {
diff --git a/src/ViewCharacterPanel.java b/app/src/main/java/dnd/ViewCharacterPanel.java
similarity index 97%
rename from src/ViewCharacterPanel.java
rename to app/src/main/java/dnd/ViewCharacterPanel.java
index 1ba898e..458355a 100644
--- a/src/ViewCharacterPanel.java
+++ b/app/src/main/java/dnd/ViewCharacterPanel.java
@@ -1,9 +1,9 @@
-package src;
+package dnd;
import java.awt.*;
import javax.swing.*;
-import static src.AppConstants.*;
+import static dnd.AppConstants.*;
public class ViewCharacterPanel extends JPanel {
diff --git a/src/Wisdom.java b/app/src/main/java/dnd/Wisdom.java
similarity index 98%
rename from src/Wisdom.java
rename to app/src/main/java/dnd/Wisdom.java
index 31c4b3c..62fd3ae 100644
--- a/src/Wisdom.java
+++ b/app/src/main/java/dnd/Wisdom.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
import java.io.Serializable;
diff --git a/src/Wizard.java b/app/src/main/java/dnd/Wizard.java
similarity index 99%
rename from src/Wizard.java
rename to app/src/main/java/dnd/Wizard.java
index 76a2ee5..5639e10 100644
--- a/src/Wizard.java
+++ b/app/src/main/java/dnd/Wizard.java
@@ -1,4 +1,4 @@
-package src;
+package dnd;
public class Wizard implements ClassTemplate {
diff --git a/src/deprecated/RoundedBorder.java b/app/src/main/java/dnd/deprecated/RoundedBorder.java
similarity index 95%
rename from src/deprecated/RoundedBorder.java
rename to app/src/main/java/dnd/deprecated/RoundedBorder.java
index 9a09f8b..518a898 100644
--- a/src/deprecated/RoundedBorder.java
+++ b/app/src/main/java/dnd/deprecated/RoundedBorder.java
@@ -1,3 +1,5 @@
+package dnd.deprecated;
+
import javax.swing.border.Border;
import java.awt.*;
diff --git a/src/Dragonborn.java b/app/src/main/java/dnd/species/Dragonborn.java
similarity index 98%
rename from src/Dragonborn.java
rename to app/src/main/java/dnd/species/Dragonborn.java
index 9e75281..d8c389c 100644
--- a/src/Dragonborn.java
+++ b/app/src/main/java/dnd/species/Dragonborn.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Dragonborn implements Race {
private final int speed = 30;
diff --git a/src/Dwarf.java b/app/src/main/java/dnd/species/Dwarf.java
similarity index 98%
rename from src/Dwarf.java
rename to app/src/main/java/dnd/species/Dwarf.java
index e6a178e..69589b7 100644
--- a/src/Dwarf.java
+++ b/app/src/main/java/dnd/species/Dwarf.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Dwarf implements Race {
private final int speed = 25;
diff --git a/src/Elf.java b/app/src/main/java/dnd/species/Elf.java
similarity index 98%
rename from src/Elf.java
rename to app/src/main/java/dnd/species/Elf.java
index 4da35d7..60ce0e0 100644
--- a/src/Elf.java
+++ b/app/src/main/java/dnd/species/Elf.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
import java.io.Serializable;
diff --git a/src/Gnome.java b/app/src/main/java/dnd/species/Gnome.java
similarity index 98%
rename from src/Gnome.java
rename to app/src/main/java/dnd/species/Gnome.java
index 0c76921..194ddfc 100644
--- a/src/Gnome.java
+++ b/app/src/main/java/dnd/species/Gnome.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Gnome implements Race {
private final int speed = 25;
diff --git a/src/HalfElf.java b/app/src/main/java/dnd/species/HalfElf.java
similarity index 98%
rename from src/HalfElf.java
rename to app/src/main/java/dnd/species/HalfElf.java
index c6b0171..20f710e 100644
--- a/src/HalfElf.java
+++ b/app/src/main/java/dnd/species/HalfElf.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class HalfElf implements Race {
private final int speed = 30;
diff --git a/src/HalfOrc.java b/app/src/main/java/dnd/species/HalfOrc.java
similarity index 98%
rename from src/HalfOrc.java
rename to app/src/main/java/dnd/species/HalfOrc.java
index 4031280..61fa3f5 100644
--- a/src/HalfOrc.java
+++ b/app/src/main/java/dnd/species/HalfOrc.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class HalfOrc implements Race {
private final int speed = 30;
diff --git a/src/Halfling.java b/app/src/main/java/dnd/species/Halfling.java
similarity index 98%
rename from src/Halfling.java
rename to app/src/main/java/dnd/species/Halfling.java
index fc58e32..9ae3e9d 100644
--- a/src/Halfling.java
+++ b/app/src/main/java/dnd/species/Halfling.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Halfling implements Race {
private final int speed = 30;
diff --git a/src/Human.java b/app/src/main/java/dnd/species/Human.java
similarity index 98%
rename from src/Human.java
rename to app/src/main/java/dnd/species/Human.java
index 948e486..8e269c0 100644
--- a/src/Human.java
+++ b/app/src/main/java/dnd/species/Human.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Human implements Race {
diff --git a/src/Race.java b/app/src/main/java/dnd/species/Race.java
similarity index 97%
rename from src/Race.java
rename to app/src/main/java/dnd/species/Race.java
index 423e1c2..1fe4077 100644
--- a/src/Race.java
+++ b/app/src/main/java/dnd/species/Race.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public interface Race {
diff --git a/src/Tiefling.java b/app/src/main/java/dnd/species/Tiefling.java
similarity index 98%
rename from src/Tiefling.java
rename to app/src/main/java/dnd/species/Tiefling.java
index a90a8e7..b8e10c5 100644
--- a/src/Tiefling.java
+++ b/app/src/main/java/dnd/species/Tiefling.java
@@ -1,4 +1,4 @@
-package src;
+package dnd.species;
public class Tiefling implements Race {
private final int speed = 30;
diff --git a/app/src/main/resources/SanSalvi.ttf b/app/src/main/resources/SanSalvi.ttf
new file mode 100644
index 0000000..e0311ea
Binary files /dev/null and b/app/src/main/resources/SanSalvi.ttf differ
diff --git a/app/src/test/java/dndcharacterbuilder/AppTest.java b/app/src/test/java/dndcharacterbuilder/AppTest.java
new file mode 100644
index 0000000..ad9559e
--- /dev/null
+++ b/app/src/test/java/dndcharacterbuilder/AppTest.java
@@ -0,0 +1,14 @@
+/*
+ * This Java source file was generated by the Gradle 'init' task.
+ */
+package dndcharacterbuilder;
+
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
+
+class AppTest {
+ @Test void appHasAGreeting() {
+ App classUnderTest = new App();
+ assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
+ }
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..18f452c
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,6 @@
+# This file was generated by the Gradle 'init' task.
+# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
+
+org.gradle.parallel=true
+org.gradle.caching=true
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..c1962a7
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..37aef8d
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
+networkTimeout=10000
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..aeb74cb
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,245 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command;
+# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+# shell script including quotes and variable substitutions, so put them in
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..93e3f59
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,92 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..c632bb1
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,17 @@
+/*
+ * This file was generated by the Gradle 'init' task.
+ *
+ * The settings file is used to specify which projects to include in your build.
+ *
+ * Detailed information about configuring a multi-project build in Gradle can be found
+ * in the user manual at https://docs.gradle.org/8.1.1/userguide/multi_project_builds.html
+ * This project uses @Incubating APIs which are subject to change.
+ */
+
+plugins {
+ // Apply the foojay-resolver plugin to allow automatic download of JDKs
+ id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
+}
+
+rootProject.name = 'dnd'
+include('app')
diff --git a/src/App.class b/src/App.class
deleted file mode 100644
index 5a19e0a..0000000
Binary files a/src/App.class and /dev/null differ
diff --git a/src/AppConstants.class b/src/AppConstants.class
deleted file mode 100644
index 1fa2222..0000000
Binary files a/src/AppConstants.class and /dev/null differ
diff --git a/src/Background.class b/src/Background.class
deleted file mode 100644
index 1e9ab69..0000000
Binary files a/src/Background.class and /dev/null differ
diff --git a/src/BasicNavPanel.class b/src/BasicNavPanel.class
deleted file mode 100644
index 1de75ed..0000000
Binary files a/src/BasicNavPanel.class and /dev/null differ
diff --git a/src/BasicPanel.class b/src/BasicPanel.class
deleted file mode 100644
index 2c27eab..0000000
Binary files a/src/BasicPanel.class and /dev/null differ
diff --git a/src/CharacterSheet.class b/src/CharacterSheet.class
deleted file mode 100644
index 792da58..0000000
Binary files a/src/CharacterSheet.class and /dev/null differ
diff --git a/src/CharacterStats.class b/src/CharacterStats.class
deleted file mode 100644
index d3a0ca9..0000000
Binary files a/src/CharacterStats.class and /dev/null differ
diff --git a/src/Charisma.class b/src/Charisma.class
deleted file mode 100644
index d42bace..0000000
Binary files a/src/Charisma.class and /dev/null differ
diff --git a/src/ChooseAbilityScoresPanel.class b/src/ChooseAbilityScoresPanel.class
deleted file mode 100644
index 08d0e56..0000000
Binary files a/src/ChooseAbilityScoresPanel.class and /dev/null differ
diff --git a/src/ClassTemplate.class b/src/ClassTemplate.class
deleted file mode 100644
index 929ca7f..0000000
Binary files a/src/ClassTemplate.class and /dev/null differ
diff --git a/src/Cleric.class b/src/Cleric.class
deleted file mode 100644
index 1682827..0000000
Binary files a/src/Cleric.class and /dev/null differ
diff --git a/src/Constitution.class b/src/Constitution.class
deleted file mode 100644
index 4b2f62f..0000000
Binary files a/src/Constitution.class and /dev/null differ
diff --git a/src/DefaultButton$1.class b/src/DefaultButton$1.class
deleted file mode 100644
index f7866a0..0000000
Binary files a/src/DefaultButton$1.class and /dev/null differ
diff --git a/src/DefaultButton.class b/src/DefaultButton.class
deleted file mode 100644
index c06735a..0000000
Binary files a/src/DefaultButton.class and /dev/null differ
diff --git a/src/DescriptionPanel.class b/src/DescriptionPanel.class
deleted file mode 100644
index f498f5d..0000000
Binary files a/src/DescriptionPanel.class and /dev/null differ
diff --git a/src/Dexterity.class b/src/Dexterity.class
deleted file mode 100644
index 49ea697..0000000
Binary files a/src/Dexterity.class and /dev/null differ
diff --git a/src/Dragonborn.class b/src/Dragonborn.class
deleted file mode 100644
index eb9eaa0..0000000
Binary files a/src/Dragonborn.class and /dev/null differ
diff --git a/src/Dwarf.class b/src/Dwarf.class
deleted file mode 100644
index f46ee15..0000000
Binary files a/src/Dwarf.class and /dev/null differ
diff --git a/src/Elf.class b/src/Elf.class
deleted file mode 100644
index 842c652..0000000
Binary files a/src/Elf.class and /dev/null differ
diff --git a/src/Fighter.class b/src/Fighter.class
deleted file mode 100644
index 07dcf6c..0000000
Binary files a/src/Fighter.class and /dev/null differ
diff --git a/src/FileManager.class b/src/FileManager.class
deleted file mode 100644
index bc98be2..0000000
Binary files a/src/FileManager.class and /dev/null differ
diff --git a/src/GUImanager.class b/src/GUImanager.class
deleted file mode 100644
index ad65b6e..0000000
Binary files a/src/GUImanager.class and /dev/null differ
diff --git a/src/Gnome.class b/src/Gnome.class
deleted file mode 100644
index ecc4bff..0000000
Binary files a/src/Gnome.class and /dev/null differ
diff --git a/src/HalfElf.class b/src/HalfElf.class
deleted file mode 100644
index 49e0423..0000000
Binary files a/src/HalfElf.class and /dev/null differ
diff --git a/src/HalfOrc.class b/src/HalfOrc.class
deleted file mode 100644
index bd3cd82..0000000
Binary files a/src/HalfOrc.class and /dev/null differ
diff --git a/src/Halfling.class b/src/Halfling.class
deleted file mode 100644
index fb71122..0000000
Binary files a/src/Halfling.class and /dev/null differ
diff --git a/src/Human.class b/src/Human.class
deleted file mode 100644
index 3b08a96..0000000
Binary files a/src/Human.class and /dev/null differ
diff --git a/src/ImageManager.class b/src/ImageManager.class
deleted file mode 100644
index 93f021f..0000000
Binary files a/src/ImageManager.class and /dev/null differ
diff --git a/src/InfoPanel.class b/src/InfoPanel.class
deleted file mode 100644
index 65faad6..0000000
Binary files a/src/InfoPanel.class and /dev/null differ
diff --git a/src/Intelligence.class b/src/Intelligence.class
deleted file mode 100644
index f48b40c..0000000
Binary files a/src/Intelligence.class and /dev/null differ
diff --git a/src/LoadCharacter.class b/src/LoadCharacter.class
deleted file mode 100644
index 16779ae..0000000
Binary files a/src/LoadCharacter.class and /dev/null differ
diff --git a/src/LoadCharacterPanel.class b/src/LoadCharacterPanel.class
deleted file mode 100644
index 96facad..0000000
Binary files a/src/LoadCharacterPanel.class and /dev/null differ
diff --git a/src/MainMenuPanel.class b/src/MainMenuPanel.class
deleted file mode 100644
index e94b84d..0000000
Binary files a/src/MainMenuPanel.class and /dev/null differ
diff --git a/src/Race.class b/src/Race.class
deleted file mode 100644
index ea9c95d..0000000
Binary files a/src/Race.class and /dev/null differ
diff --git a/src/Skills.class b/src/Skills.class
deleted file mode 100644
index a5083de..0000000
Binary files a/src/Skills.class and /dev/null differ
diff --git a/src/Stats.class b/src/Stats.class
deleted file mode 100644
index fe4239d..0000000
Binary files a/src/Stats.class and /dev/null differ
diff --git a/src/Strength.class b/src/Strength.class
deleted file mode 100644
index af4860c..0000000
Binary files a/src/Strength.class and /dev/null differ
diff --git a/src/Tester.class b/src/Tester.class
deleted file mode 100644
index 9a8cb14..0000000
Binary files a/src/Tester.class and /dev/null differ
diff --git a/src/Tiefling.class b/src/Tiefling.class
deleted file mode 100644
index 44e3ca9..0000000
Binary files a/src/Tiefling.class and /dev/null differ
diff --git a/src/ViewCharacterPanel.class b/src/ViewCharacterPanel.class
deleted file mode 100644
index 124d933..0000000
Binary files a/src/ViewCharacterPanel.class and /dev/null differ
diff --git a/src/Wisdom.class b/src/Wisdom.class
deleted file mode 100644
index ee7f088..0000000
Binary files a/src/Wisdom.class and /dev/null differ
diff --git a/src/Wizard.class b/src/Wizard.class
deleted file mode 100644
index da885c8..0000000
Binary files a/src/Wizard.class and /dev/null differ