Purpose

The purpose of this session is for you to consolidate your learning from the last few sessions - in a fun way.

You will implement a linear narrative into the game world you designed earlier in the course.

Objectives

Demonstrate - in code - use of:

  • Defining functions using the def keyword.
  • Writing a function that returns a value.
    • inc. capturing the returned value.
  • Passing value(s) to functions as parameter(s).

Activity 1

  • Analyse the full dragon_realm.py program,
    • Pay specific attention to the automation of the defined functions at the bottom of the program.

Activity 2

  • Draw a flowchart for a narrative set in your gameworld.
  • Implement your narrative in the same way is is done in Dragon Realm.