From 371312fdf31262deb01fe68b6eb644ed7a18f9d1 Mon Sep 17 00:00:00 2001 From: Adam Roesner <67762559+roesnera@users.noreply.github.com> Date: Tue, 22 Nov 2022 12:03:48 -0500 Subject: [PATCH 1/6] Update README.md --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bc79c46..0cb0f78 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,12 @@ constructor with the name. Create a setter method opponent); an no attributes.
  • To the Warrior class. Add a decHealth method with a single parameter int amt. Set the health value to Math.max(0, health – -amt); which will keep the health attribute from going negative. Then -call the opponent’s decHealth method. The getName, getHealth, +amt); which will keep the health attribute from going negative. The getHealth and setHealth from Person class will be used.
  • To the Warrior class add an attack method that takes a Warrior opponent parameter. If this warrior’s health is positive and the opponent’s health is positive and this warrior’s weapon is not null, -print this warrior’s name is attacking the opponent’s name. Finally, - print the opponent’s name and health.
  • +print this warrior’s name is attacking the opponent’s name. Then, call the strike method of the weapon attribute of your warrior class. Finally, print the opponent’s name and health.
  • Use the provided Weapons and Main classes to validate your Warrior and Weapon classes.
  • Output should be: