Files
java-question/Question13-Extends/src/PTra13_07.java
2026-09-09 08:34:32 +09:00

28 lines
1.1 KiB
Java
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* PTra13_07.java
* 作成 Rhizome
*------------------------------------------------------------
* Copyright(c) Rhizome Inc. All Rights Reserved.
*/
public class PTra13_07 {
public static void main(String[] args) {
//※この問題はPTra13_03、PTra13_04で作成したHero、Slimeクラスを使用して解いてください。
// TODO SuperHeroインスタンスとSlimeインスタンスを作成し、それぞれの名前に"勇者(装備あり)", "スライム"を設定してください
// TODO Itemクラスのインスタンスを作成し、("ロングソード", 20)をコンストラクタの引数にしてください
// TODO SuperHeroインスタンスのitemフィールドに作成したitemインスタンスを設定してください
/*
* TODO SuperHeroとSlimeを、どちらかが体力0になるまで戦わせます
*
* ●SuperHeroの攻撃 -> ダメージ判定 -> Slimeの攻撃 -> ダメージ判定
* 上記を繰り返し行います
*
* 戦闘が終了したら、勝利した方の出力を行ってください。「○○は■■との戦闘に勝利した」
*/
}
}