Fight Game is battle game that involves players, a knight, a wizard, and an enemy. The game is designed with a turn-based system where players take turns attacking the enemy, and the enemy counterattacks if it is still alive.
-
Java Servlets: The backend of the game is implemented using Java Servlets to handle server-side logic.
-
JSP (JavaServer Pages): JSP is employed to create dynamic web pages, enhancing the user interface of the game.
-
Bootstrap: The game's frontend is designed using Bootstrap to ensure a responsive and visually appealing user interface.
-
JavaScript (JS): JS is utilized for client-side scripting, enabling interactive features within the game.
-
*CSS (Cascading Style Sheets)
-
Players: The game features a knight and a wizard, each with their own set of attributes such as name, health points (pv), and attack capabilities.
-
Enemy: An enemy with its own set of attributes, including name, health points, and loot drop (in this case, a POTION).
-
Turn-based System: The game utilizes a turn-based system where each player takes a turn to attack the enemy, and the enemy counterattacks if still alive.
-
Outcome: The game determines the outcome based on whether all players or the enemy are alive at the end of the simulation.
-
Player Initialization: The
Traitementclass initializes a knight, a wizard, and an enemy. Players are stored in a list. -
Main Simulation Loop: The main method contains a simulation loop where players take turns attacking the enemy until either all players or the enemy are defeated.
-
Outcome Display: The game displays the final state of the enemy and the players . The outcome message will indicate whether the players or the enemy emerged victorious.