-
Getting Started with Python and our adventure game
12 Lessons-
PreviewThe obligatory "Hello, World!" program
-
StartThe structure of a Python Program
-
StartAn aside: Python's basic data types
-
StartWhere to put variables: scope
-
StartGetting started with our adventure game
-
StartAnother aside: functions
-
StartImplementing a while loop to keep the program running
-
StartReading from the terminal
-
StartMaking decisions based on user input
-
StartAn aside: Python's comparison operators
-
StartPrinting help and sanitizing user input
-
StartSpicing things up with colour
-
-
Making the Game functional with Classes
9 Lessons-
StartPython Classes
-
StartThe Player class
-
StartThe Room class
-
StartThe Game class
-
StartUsing our classes, and getting started with game movement
-
StartUsing a new data type, tuples, to help with room descriptions
-
StartNavigating around the labyrinth
-
StartAn aside: the dictionary data structure
-
StartShowing items and monsters
-
-
implementing an Inventory
13 Lessons-
StartLists, and adding a list to the Player class for inventory items
-
StartGetting started with picking items up
-
StartCompleting the functionality for picking items up
-
StartDisplaying the current inventory
-
StartAn aside: more about looping
-
StartCleaning up game play by printing room descriptions only when necessary
-
StartDropping items
-
StartEquipping items
-
StartShowing equipped items, and a challenge
-
StartSolution to challenge
-
StartUnequip an item
-
StartImplement the "status" command, to show the player how they are doing
-
StartAn aside: different ways of printing strings with variables
-
-
Implementing a turn-based combat system
9 Lessons-
StartHow combat will work
-
StartGiving the player a chance to fight or flee
-
StartStarting combat: "rolling for initiative"
-
StartPlayer's turn
-
StartMonster's turn
-
StartWarning the player when their health is low
-
StartAdding XP, incrementing the number of monsters defeated, and awarding gold
-
StartAdjusting the attack roll based on weapon, armor, shield, and monster type
-
StartLetting a player rest to regain health
-
-
Keeping track of player location using a map
11 Lessons-
StartWhat we are going to build in this section
-
StartDefining how big our map will be, and saving that information in the Game class
-
StartPrepopulating all rooms in the map
-
StartKeeping track of the player's location, and limiting movement to the current map
-
StartChallenge: verifying our logic when checking player movement
-
StartSolution to challenge
-
StartTrying out our code and updating our position on the map
-
StartKeeping track of player movement
-
StartImplementing a (partially functional) "map" command
-
StartMaking the map function more useful
-
StartFinalizing the "map" command
-
