Description:  The game is a single player scenario, in which the player’s army needs to defeat the enemy’s (AI’s) army.  There are 4 possible troops for an army: Archers, Spearman, Cavaliers, Footman.  Each troop has some attributes and some actions. And to avoid excessive programming and calculation, we want to treat these troops as squadrons.  The player always starts with 10 squadrons of their choices: they can choose any combinations of the 4 possible troop types. Each squadron should have 100 members of that troop type. Each turn, the player is allowed to choose one of their squadrons and perform an action which is allowed by that troop type. Player and the AI take turns to make actions. The game continues until either the player or the AI has no troops left.   Troop Types and Descriptions:  Archers: should be able to attack from range with no casualties, meaning the attack action should not cause any damage to themselves. They should be pretty fragile to anything themselves. They can’t be attacked by other 3 troop types unless there are no more melee troops alive in its army.    Footman: nothing special, decent health, decent attack. They should be able to attack with some casualties.    Cavaliers: Assaulting units. Their attack action deals super high damage while causing very small casualties unless they are against spearmen. But they are intrinsically fragile if being attacked.    Spearmen: Defending units with a lot of health. Their attack actions do very little damage to all other units except for cavaliers.  Requirements:  Your game should be a single player game with multiple difficulty levels. Computers will have more squadrons based on the difficulty level. You should be sticking with OOP standards and implementing the concept of modular designs.  Game doesn’t have to be perfectly balanced, but should be at least playable.  Each Troop type should be an individual class.  AI doesn’t have to be smart, you can simply let AI randomly choose what to attack. (Or it will get super complicated very fast)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 4GZ
icon
Related questions
icon
Concept explainers
Question

Description: 

The game is a single player scenario, in which the player’s army needs to defeat the enemy’s (AI’s) army. 

There are 4 possible troops for an army: Archers, Spearman, Cavaliers, Footman. 

Each troop has some attributes and some actions. And to avoid excessive programming and calculation, we want to treat these troops as squadrons. 

The player always starts with 10 squadrons of their choices: they can choose any combinations of the 4 possible troop types. Each squadron should have 100 members of that troop type.

Each turn, the player is allowed to choose one of their squadrons and perform an action which is allowed by that troop type. Player and the AI take turns to make actions.

The game continues until either the player or the AI has no troops left.

 

Troop Types and Descriptions: 

Archers: should be able to attack from range with no casualties, meaning the attack action should not cause any damage to themselves. They should be pretty fragile to anything themselves. They can’t be attacked by other 3 troop types unless there are no more melee troops alive in its army. 

 

Footman: nothing special, decent health, decent attack. They should be able to attack with some casualties. 

 

Cavaliers: Assaulting units. Their attack action deals super high damage while causing very small casualties unless they are against spearmen. But they are intrinsically fragile if being attacked. 

 

Spearmen: Defending units with a lot of health. Their attack actions do very little damage to all other units except for cavaliers. 



Requirements: 

  1. Your game should be a single player game with multiple difficulty levels. Computers will have more squadrons based on the difficulty level.
  2. You should be sticking with OOP standards and implementing the concept of modular designs. 
  3. Game doesn’t have to be perfectly balanced, but should be at least playable. 
  4. Each Troop type should be an individual class. 
  5. AI doesn’t have to be smart, you can simply let AI randomly choose what to attack. (Or it will get super complicated very fast)
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Control Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT