## Prior learning/place of lesson in scheme of work
Learn how to create a minesweeper game with **if**, `if condition do` , **global variables** to keep track of the action that the player is asked to perform. We will be learning how to create a bop it game using functions, global variables, if (conditionals), input on button pressed, math random, logo down, add score, as well as simple commands such as show string.
* learn how the game library supports single-player, time-based games: a game library supports setting a number of lives, score, countdown clock, and levels.
* learn how to create a global variable as a place where you can store data so that you can use it later in your code, accessible across functions and in nested code blocks
* learn how the assignment operator is used to declare a new variable or update the value of a variable
* learn how to create a function as a unit of code that performs a specific task and returns a result to make the code easier to read, debug, and update
* learn how to call an existing function in the script
* learn how to return a random number
* learn how to run code when an input button is pressed
* learn how to run code when the BBC micro:bit is oriented perpendicularly to the floor with the logo down
* learn how to run code when the BBC micro:bit is shaken; when running code in the web browser, moving the mouse quickly simulates shaking
* learn how to conditionally run code depending on whether a condition is true or not
* learn how to show a string of the LED screen one character at a time (scrolling left to right)
* learn how to show a number on the LED screen one digit at a time (scrolling left to right)
## Links to the National Curriculum Programmes of Study for Computing