Mind map
Algorithm Challenges
Map content
Algorithm Challenges
Algorithm Challenge 1
- Keywords to use
- DECLARE
- Declare variables
- FUNCTION
- Declare a function
- SELECT
- Select variables
- OUTPUT
- Display information for the player to see
- DECLARE
- To randomise location
- Choose a number from the 4 centre squares randomly
- 5
- 6
- 9
- 10
- Choose a number from the 4 centre squares randomly
- Relevant Algorithm Constructs
- Modularisation
- Code clusters
- Assignment
- Assigns variables values
- Modularisation
- Possible variables
- randomiseLocation
- A randomised location
- randomiseNumber
- Number picked at random
- randomiseLocation
- Keywords to use
Algorithm Challenge 2
- Keywords to use
- DECLARE
- Declare variables
- FUNCTION
- Declare a function
- IF, ELSE
- If a condition is met an action is done, else another action is done
- TRUE, FALSE
- Confirms/Denies
- DECLARE
- Relevant Algorithm Constructs
- Assignment
- Assigns variables values
- Condition
- An action taken in accordance to a condition
- Modularisation
- Code Clusters
- Selection
- Two choices are given
- Assignment
- To eat bread
- If a player inputs eat bread then run the code to eat bread
- Bread will restore 1 player health and decrease one available bread
- To obtain bread
- Check if the player location is at the bakery
- If a player inputs talk to baker then run the code to buy bread
- Possible variable
- Main variables
- breadAmount
- backpack
- ItemName
- Bread
- playerHealth
- Function variables
- eatBread
- checkBackpack
- bakerBread
- Main variables
- Keywords to use
Algorithm Challenge 3
- Keywords to use
- DECLARE
- Declare variables
- FUNCTION
- Declare function
- IF, ELSE
- If a condition is met an action is done, else another action is done
- SET
- Set a variable to a certain property
- OUTPUT
- Display information for the player to see
- DECLARE
- Relevant Algorithm Construct
- Assignment
- Assigns variables values
- Modularisation
- Code cluster
- Condition
- An action taken in accordance to a condition
- Assignment
- Attacking the dragon
- Check the backpack for a sword, and the dragon will lose 1 health when there is a sword.
- Possible Variables
- Main variables
- dragonHealth
- sword
- playerHealth
- mapLocList
- mapLoc
- Function variables
- attackDragon
- deathMessage
- dragonAttack
- checkBackpack
- Main variables
- Dragon attacking player
- Once the player attacks, retaliate by attacking the player
- Keywords to use
Required tools
- A typing tool allowing indentation
- Word Document
- Notepad++
- Sublime Text 3
- Variables
- randomiseLocation
- randomiseNumber
- Pseudo Code
- A typing tool allowing indentation
Information
- Description
- Mind Map on Algorithm Challenges, created by Galen Li on 20/02/2021.
- Created by
- Galen Li
- Views
- 0
- Rating