Skip to content

The project provided an opportunity to learn and reinforce several key concepts in programming, particularly in JavaScript

Notifications You must be signed in to change notification settings

statuja/text-based_RPG-Pokemon_lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

Pokemon Lite

Overview

This project serves as a practical exercise in applying programming concepts to create a simple interactive simulation. It also provides a foundation that can be built upon for more complex projects and serves as a starting point for learning game development or simulation programming.

Pokemon Lite simulates a Pokemon battle between three different Pokemon — Pikachu, Bulbasaur, and Mankey. Each Pokemon has a set of attack skills with varying damage and magic requirements. The battle outcome depends on the strategic use of attack skills, health, and magic points.

Key concepts

Object-Oriented Programming (OOP):

The project uses classes (AttackSkill and Pokemon) to model entities and their behavior. This approach follows OOP principles by encapsulating data and methods into objects.

Class Constructors and Methods:

Understanding how to define and use class constructors and methods is essential for creating reusable and organized code. In this project, constructors initialize the state of objects, and methods perform actions such as attacking, learning skills, and displaying status.

Arrays and Data Structures:

The use of arrays to store attack skills in the skills property of the Pokemon class demonstrates the importance of data structures in managing and organizing information.

Conditional Statements:

The project uses conditional statements (if statements) to handle various scenarios during the battle, such as checking if a Pokemon has a specific attack skill, if there is enough magic to launch an attack, and if a Pokemon is already defeated.

Simulation and Iteration:

The battle simulation involves multiple rounds of attacks and status checks, requiring an understanding of iteration (looping). Although the project does not explicitly use loops, it could be extended to include more dynamic and iterative gameplay.

Randomization:

The line that generates random magic points during the getMagic method demonstrates how to introduce an element of randomness into the project. This could be useful for creating more dynamic and unpredictable gameplay.

Logging and Debugging:

The use of console.log statements helps in debugging and understanding the flow of the program. It's a fundamental practice in development to log information for testing and troubleshooting.

About

The project provided an opportunity to learn and reinforce several key concepts in programming, particularly in JavaScript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published