Skip to content

Text-based strategic war game simulation in Java, featuring OOP principles, army management, battles, and resource control.

Notifications You must be signed in to change notification settings

AFalkowski1/war-game-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

War Game Simulation

The War Game Simulation project is a strategic text-based game simulation where two generals compete against each other, commanding armies and managing resources. The goal is to build the largest and best-trained army to defeat the opponent. The application demonstrates the use of key object-oriented programming principles, such as inheritance, polymorphism, and design patterns.


Key Features and Rules

  • Generals: Each general manages an army of soldiers and a bag of gold coins. Their goal is to expand and train their army.
  • Soldiers: Soldiers have military ranks and experience. A soldier's strength is the product of their rank and experience.
  • Maneuvers: A general can order maneuvers, which increase soldiers' experience but cost coins.
  • Attack: Generals can attack each other. The winner is determined based on the total strength of the armies. The winner gains gold and experience for their soldiers, while the loser loses gold and experience. In the event of a draw, each general loses a random soldier.
  • Recruitment: A general can buy new soldiers who have initial experience.
  • Promotion: A soldier is promoted to a higher rank when their experience reaches a certain threshold.
  • Save and Load State: A general can save and load the state of their army and resources to/from the disk.
  • Reports: The president's secretary monitors the game's progress and generates reports on the generals' actions.

Key Technical Aspects

The project was implemented using object-oriented programming principles, and the following are subject to evaluation:

  • Class Creation and Composition: The correct design of classes like General, Soldier, etc.
  • Inheritance and Polymorphism: The use of inheritance to model hierarchies (e.g., military ranks) and polymorphism to handle different types of soldiers.
  • Design Patterns: The application of appropriate design patterns to solve problems within the simulation.
  • Algorithms: The implementation of algorithms for combat, maneuvers, and soldier promotion.
  • Unit Tests: The project includes unit tests to verify the correctness of the implemented functionalities.

How to run?

To run the project, follow the standard compilation and execution steps for the programming language used. Ensure that you have the environment and any dependencies configured.

Author: A. Falkowski | Project created as a programming exercise.

About

Text-based strategic war game simulation in Java, featuring OOP principles, army management, battles, and resource control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages