---
# System prepended metadata

title: MSTU5013 Midterm Project

---

# MSTU5013 Midterm Project
### Tiffany Zhu
#### Project link: https://codepen.io/yz4432/pen/PodVyGm

For my project, I designed a webgame called "Pokemon Battle". There are two players involved in the game and each of them fight with their pokemons. The default setting include two players' names and the text "ready...". As I click the start button, the battle begins. Two player's pokemons will randomly show up and the function`battleResults()` will show the battle results. I only added 3 pokemons here based on their types: fire, grass, water, as they are super effective to one another. My code reference is Dr.Kuwata's dice game: `https://codepen.io/jmk2142/pen/bGNKErp`

Challenge encountered:
![](https://i.imgur.com/DH9GzHY.png)
I planned to manipulate a function to randomly show the pokemons, similar to the `roll()` funtion in the dice game. And I was going to name a button "throw", however the console indicated that there is alreadt a property name "throw" in Javascrit Keyword. Then I just created a button element linked to function`getRandomPokemons()`.
