From 881464c0770dce1967a30db0a0a1ee27ced671e3 Mon Sep 17 00:00:00 2001 From: Joshua-Ashton01 Date: Tue, 25 Oct 2022 11:57:17 -0600 Subject: [PATCH] test character --- 1410_DND/src/dnd/Character.java | 14 +++++++------- 1410_DND/src/dnd/CharacterStats.java | 2 -- 1410_DND/src/dnd/dndTestClient.java | 2 -- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/1410_DND/src/dnd/Character.java b/1410_DND/src/dnd/Character.java index b88bf5b..68b849f 100644 --- a/1410_DND/src/dnd/Character.java +++ b/1410_DND/src/dnd/Character.java @@ -5,7 +5,7 @@ public class Character { private int age; private int heightFeet; private int heightInch; - private int weigth; + private int weight; private String eye; private String hair; private Race race; @@ -21,13 +21,13 @@ public class Character { */ public Character(String name, int age, int heightFeet, int heightInch, - int weigth, String eye, String hair, + int weight, String eye, String hair, Race race) { this.name = name; this.age = age; this.heightFeet = heightFeet; this.heightInch = heightInch; - this.weigth = weigth; + this.weight = weight; this.eye = eye; this.hair = hair; this.race = race; @@ -40,7 +40,7 @@ public class Character { this.age = 0; this.heightFeet = 0; this.heightInch = 0; - this.weigth = 0; + this.weight = 0; this.eye = "null"; this.hair = "null"; @@ -72,8 +72,8 @@ public class Character { /** * @return the weigth */ - public int getWeigth() { - return weigth; + public int getWeight() { + return weight; } /** * @return the eye @@ -90,7 +90,7 @@ public class Character { @Override public String toString() { - return name; + return "name: " + name + " | age: " + age + " | height: " + heightFeet + "\'" + heightInch + "\" | weight: " + weight + " | eye: " + eye + " | hair: " + hair; } } diff --git a/1410_DND/src/dnd/CharacterStats.java b/1410_DND/src/dnd/CharacterStats.java index 9751554..9eca18a 100644 --- a/1410_DND/src/dnd/CharacterStats.java +++ b/1410_DND/src/dnd/CharacterStats.java @@ -12,7 +12,6 @@ public class CharacterStats { // 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) { - System.out.println("Constructor started in CharacterStats."); this.stats = new Stats[]{ new Strength(str), @@ -23,7 +22,6 @@ public class CharacterStats { new Charisma(cha) }; - System.out.println("stats[] created with new stats."); } diff --git a/1410_DND/src/dnd/dndTestClient.java b/1410_DND/src/dnd/dndTestClient.java index 9ba3edb..eee7863 100644 --- a/1410_DND/src/dnd/dndTestClient.java +++ b/1410_DND/src/dnd/dndTestClient.java @@ -1,7 +1,5 @@ package dnd; -import com.builder.CharacterStats; - public class dndTestClient { public static void main(String[] args) {