import javax.swing.JOptionPane; /** * Author: Josiah Yoder et al. * Class: SE1011-011 * Date: 10/28/13 9:09 AM * Lesson: Week 7, Day 1 */ public class GameState021_8_1 { int enemy=15; int health=15; int enemyRoll=0; int playerRoll=0; String input=""; Die021_8_1 enemyHit=new Die021_8_1(100); Die021_8_1 hitChance=new Die021_8_1(100); Die021_8_1 enemyAI=new Die021_8_1(2); private void rollTheDice() { enemyRoll=enemyHit.roll(); playerRoll=hitChance.roll(); } private void simulateShots(int deltaHealth, int deltaEnemy, int tieHealth, int tieEnemy) { if(enemyRoll>playerRoll){ //enemy wins roll health-=deltaHealth; JOptionPane.showMessageDialog(null, "The enemy hits you for "+deltaHealth+" damage!"); } else if (enemyRoll