Coders Packet

Harry Potter Game Using Java

By Parth Bhutani

This project is a Harry Potter Game that has been made with the use of Java Programming Language. You have to play it wisely to be a winner.

ABOUT THE PROJECT

The "Harry Potter Game" is the game that can be played on the console of your java ide whether it's eclipse or NetBeans.

PREREQUISITES REQUIRED FOR THE PROJECT

To create this project one should have the knowledge of basic Java language. How to use if-else loops, how to use classes, use of keywords such as break, continue etc. 

CLASSES USED 

1 import java.util.Scanner;
2 import java.util.Random;

One should have a great command on using the java.util.Random in order to create such game

SOURCE CODE DESCRIPTION

This game project you as HARRY POTTER (The great Wizard) and your motive is to defeat the evil VOLDERMORT. 

DECLARED VARIABLES CONSITS OF- The name of enemies, The name of weapons, The attacks of enemies, Value of attacks, Damage by attacks, and some more. 

The code consists of many conditional statements which will be acted in accordance with the command provided by the user. 

WHAT'S IN THE CONDITIONAL STATEMENTS???

Conditional statements act according to the choices you enter in the console. It consists of logical operator such as && and OR. The increment and decrement operators are used to increase and decrease the health, damage, gold etc. 

The game finishes when you defeat the enemy head - VOLDERMORT

Download Complete Code

Comments

No comments yet