Implemented read/write of saved characters, currently a Tester.java file tests the ability to save and read saved characters, and the Application has a rudimentary GUI interface to choose to load a specific save file and see information about that character.

This commit is contained in:
Josh Ashton
2022-11-29 17:50:28 -07:00
parent 67624b18b5
commit 4d5fd7c952
38 changed files with 498 additions and 170 deletions
+20 -10
View File
@@ -1,4 +1,6 @@
public class Elf implements Race {
import java.io.Serializable;
public class Elf implements Race, Serializable {
private final int speed = 30;
private final int maxAge = 750;
private String[] traits;
@@ -14,57 +16,65 @@ public class Elf implements Race {
@Override
public String getRace() {
// TODO Auto-generated method stub
return this.getClass().getSimpleName();
}
@Override
public int maxAge() {
// TODO Auto-generated method stub
return maxAge;
}
@Override
public int getSpeed() {
// TODO Auto-generated method stub
return speed;
}
@Override
public String[] getTraits() {
// TODO Auto-generated method stub
return traits;
}
@Override
public String[] getSkills() {
// TODO Auto-generated method stub
return skills;
}
@Override
public String[] getLanguages() {
// TODO Auto-generated method stub
return languages;
}
@Override
public String[] getProficiencies() {
// TODO Auto-generated method stub
return proficiencies;
}
@Override
public int[] getASI() {
// TODO Auto-generated method stub
return new int[]{1, 1};
}
@Override
public String toString() {
// TODO Auto-generated method stub
return this.getClass().getSimpleName();
}
}