This code snippet shows how you can use variables to win your game
An example of when you could use variables to win your game is on the right. It uses a score variable, and if the score is larger than a certain value – in this case 100 – the game ends.
Another example of when you could use variables is ending the game if the population gets large enough. You could do this by firstly using the ‘population variables’ code snippet to count. Next, replace the ‘score’ variable in this code snippet with the ‘offspring count’ variable