Public Fighter(String name, int numAttacks, int hitDamage, int lifePoints, int armor) Int numAttacks, hitDamage, lifePoints, armor Here's the entire code for that class: import I'm not sure why, because in a method for a different game that I got from my teacher, he uses the same code and it works. However, it gives me a "return type required error" on line 8. Public Monster(String name, int bodyPoints, int mindPoints, int attack, int defense) Int bodyPoints, mindPoints, attack, defense String name //characteristics of monsters Here is the code for it: public class Methods Ok, so I'm trying to make a constructor for a text-based game for a monster.
0 Comments
Leave a Reply. |