test character

This commit is contained in:
Joshua-Ashton01
2022-10-25 11:57:17 -06:00
parent b1d6e51ee5
commit 881464c077
3 changed files with 7 additions and 11 deletions
+7 -7
View File
@@ -5,7 +5,7 @@ public class Character {
private int age; private int age;
private int heightFeet; private int heightFeet;
private int heightInch; private int heightInch;
private int weigth; private int weight;
private String eye; private String eye;
private String hair; private String hair;
private Race race; private Race race;
@@ -21,13 +21,13 @@ public class Character {
*/ */
public Character(String name, int age, public Character(String name, int age,
int heightFeet, int heightInch, int heightFeet, int heightInch,
int weigth, String eye, String hair, int weight, String eye, String hair,
Race race) { Race race) {
this.name = name; this.name = name;
this.age = age; this.age = age;
this.heightFeet = heightFeet; this.heightFeet = heightFeet;
this.heightInch = heightInch; this.heightInch = heightInch;
this.weigth = weigth; this.weight = weight;
this.eye = eye; this.eye = eye;
this.hair = hair; this.hair = hair;
this.race = race; this.race = race;
@@ -40,7 +40,7 @@ public class Character {
this.age = 0; this.age = 0;
this.heightFeet = 0; this.heightFeet = 0;
this.heightInch = 0; this.heightInch = 0;
this.weigth = 0; this.weight = 0;
this.eye = "null"; this.eye = "null";
this.hair = "null"; this.hair = "null";
@@ -72,8 +72,8 @@ public class Character {
/** /**
* @return the weigth * @return the weigth
*/ */
public int getWeigth() { public int getWeight() {
return weigth; return weight;
} }
/** /**
* @return the eye * @return the eye
@@ -90,7 +90,7 @@ public class Character {
@Override @Override
public String toString() { public String toString() {
return name; return "name: " + name + " | age: " + age + " | height: " + heightFeet + "\'" + heightInch + "\" | weight: " + weight + " | eye: " + eye + " | hair: " + hair;
} }
} }
-2
View File
@@ -12,7 +12,6 @@ public class CharacterStats {
// TODO: Need to implement constructor, validates all proposed ability scores and creates new objects containing corresponding values. // TODO: Need to implement constructor, validates all proposed ability scores and creates new objects containing corresponding values.
public CharacterStats(int str, int dex, int con, int intel, int wis, int cha) { public CharacterStats(int str, int dex, int con, int intel, int wis, int cha) {
System.out.println("Constructor started in CharacterStats.");
this.stats = new Stats[]{ this.stats = new Stats[]{
new Strength(str), new Strength(str),
@@ -23,7 +22,6 @@ public class CharacterStats {
new Charisma(cha) new Charisma(cha)
}; };
System.out.println("stats[] created with new stats.");
} }
-2
View File
@@ -1,7 +1,5 @@
package dnd; package dnd;
import com.builder.CharacterStats;
public class dndTestClient { public class dndTestClient {
public static void main(String[] args) { public static void main(String[] args) {