Help 2 - Gameplay
General Gameplay
Let's start defining our function play()
so it initialises the game by:
- printing a welcome message;
- asking to the user how many statues he wants (n parameter);
- asking to the user how many mirrors he wants (m parameter);
- initialising the garden using the
create_garden(n,m)
function; - showing the garden using the
show_garden(garden)
function.
Example
By now, if you call your play()
function at the bottom of your code, it should print the following output:
Then this function should start a loop where you ask the user what he wants to do:
- start the water;
- add a mirror;
- leave the game.
If the user wants to leave the game, it should stop the loop and print a goodbye message.
Example
You should now get this additional output:
Add Mirrors
This function should be called when the user chooses the option 2 and it should:
- Use 3 inputs to ask the row, the column and the orientation of the mirror that the user wants to add;
- Update the garden and print it.