8000 GitHub - brianzhou139/PokeArena: Create your own dream team and battle it out!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

brianzhou139/PokeArena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Category: senior

I've been writing code for about 36 months

PokeArena : Create your own dream team and battle it out!

A Pokemon battle simulator that lets you battle Pokémon against each other using the data from the PokeAPI.

  • You can battle any two Pokemon against each other that are in the PokeAPI database
  • You can create teams of Pokemons and battle other trainers' teams, the first trainer to have all of their Pokemon faint loses the battle.

Prerequisites

  • python3
  • internet

The code solely relies on built-in modules.

Quick start

The code was tested on servers running Debian GNU/Linux and will work correctly on any clean system. Use the following commands to get started:

$ git clone https://github.com/brianzhou139/PokeArena.git
$ cd PokeArena

Simulating a battle between two pokemons

To simulate a battle between two pokemons of choice, launch the app using the following parameters:

$ python3 main.py -b <pokemon1_name> <pokemon2_name>

where:
<pokemon1_name> – name of pokemon e.g bulbasaur,
<pokemon2_name> – name of pokemon e.g charizard.

Example

$ python3 main.py -b bulbasaur charizard

Simulating a battle between two teams

To simulate a battle between two teams, launch the app using the following parameters:

$ python3 main.py -b <first_team_file> <second_team_file>

where:
<first_team_file> – path to the text file containing the names of the members of the first team e.g teamA.txt
<second_team_file> – path to the text file containing the names of the members of the second teame.g teamB.txt.

Each file must contain a list of team members separated by commas, spaces, or newlines.

Example

$ python3 main.py -b teamA.txt teamB.txt

The output data is displayed as text on the console, which shows the results of the moves played by the pokemons, as well as the overall outcome of the battle.

Sample output :

...
...
charizard attacks kakuna
move : natural-gift
power : 31
damage inflicted on kakuna : 4.083
charizard's hp :65.399
kakuna's hp :3.634
-------------------------------------------
kakuna attacks charizard
move : electroweb
power : 55
damage inflicted on charizard : 2.705
kakuna's hp :3.634
charizard's hp :62.694
-------------------------------------------
charizard attacks kakuna
move : power-up-punch
power : 40
damage inflicted on kakuna : 4.688
charizard's hp :62.694
kakuna's hp :-1.054
-------------------------------------------
charizard has won

About

Create your own dream team and battle it out!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0