Individual review

Overview

  • We made a turned based fantasy game that is player vs AI. You have the option to either attack or move around the map. Each move the enemy AI has the same option of either moving or attacking. The enemy is invisible so you don’t know where he is. When he moves within one space of you you are notified and prompted to attack. before you start the game you can select from a variety of classes like mage, night, etc. which give you different strengths on the field. Once you attack and hit the enemy you win.

My feature

  • For my feature I worked on the code for our AI and as well as the screens for our main game. I worked on creating the Images and the text boxes where you input your attack or movement location. Within Javascript I worked on define functions for our AI. I created functions that allowed our AI to move or attack and give it an option/probability of either moving or attacking. It generates a number between 1-9 and then chooses that location to either move or attack.
2 Column 6 Row Table
College Board Requirments My Code
Instructions for input from one of the following: the user, a device, an online datas stream, a file. Our project lets the user battle an AI. You are given the option to move or attack and when the enemy is in range you will be notified. Your enemy is has the same options and its your job to attack and take down the enemy. The AI has a generator that picks a location on the board to wither attack or move to. this moves the enemy around the board and gives him a probability of attacking you. When you, the user, moves around the board your inputs are saved and it determines where you will move.
Use of at least one list (or other collection type) to represent a collectino of data that is stored and used to manage program complexity and help fulfill the users purpose. - mapImages is used to change your display whenever you move to a certain positino on the map. When you input a new location to move mapImages uses the corresponding image that responds with the proper location you entered, and then it updates your display.
At least one procedure that contirubted to the program’s intened purpose where you have defined: the name, return type, one or more parameters: - The name is enemychoice2 - return moves the position of the AI - parrameters are array
An algorithm that includes sequencing, selection, and iteration that is in the body of the selected procedure - This function uses a while loop which continues when moveposition is equal to position. It moves through the sequence in a specific order and then it checks the condition to make sure the enemy moves to a different position.
Calls to your student-developed prodcedure: - Within the enemy move function it calls the previous function I showcased called enemychoice2 which generates a random location to select.
Instructions for output (tactile, audible, visual, or ) based on input and program functionality - This function has a return moveposition which uses the array to select a random number and the ouput of the function moves the enemy to that location that has been selected by the array
## More Commits - This html code creates are original starting gamescreen as well as this sizing and boarders. The first black box displays all are text about the enemy and the locations you can move or attack. The white input box is the location where you type in where you would like to move to.