Zenler Player
Your course is loading. Hang tight.
Working with Python - Introductory Level
Back to curriculum
0% Complete
0% Complete
Introduction
Installing Python (Macintosh)
Installing Python (Windows)
Installing the PyCharm CE
Python resources and documentation
How to ask for help
Is Python interpreted, compiled, or both?
The obligatory "Hello, World!" program
The structure of a Python Program
An aside: Python's basic data types
Where to put variables: scope
Getting started with our adventure game
Another aside: functions
Implementing a while loop to keep the program running
Reading from the terminal
Making decisions based on user input
An aside: Python's comparison operators
Printing help and sanitizing user input
Spicing things up with colour
Python Classes
The Player class
The Room class
The Game class
Using our classes, and getting started with game movement
Using a new data type, tuples, to help with room descriptions
Navigating around the labyrinth
An aside: the dictionary data structure
Showing items and monsters
Lists, and adding a list to the Player class for inventory items
Getting started with picking items up
Completing the functionality for picking items up
Displaying the current inventory
An aside: more about looping
Cleaning up game play by printing room descriptions only when necessary
Dropping items
Equipping items
Showing equipped items, and a challenge
Solution to challenge
Unequip an item
Implement the "status" command, to show the player how they are doing
An aside: different ways of printing strings with variables
How combat will work
Giving the player a chance to fight or flee
Starting combat: "rolling for initiative"
Player's turn
Monster's turn
Warning the player when their health is low
Adding XP, incrementing the number of monsters defeated, and awarding gold
Adjusting the attack roll based on weapon, armor, shield, and monster type
Letting a player rest to regain health
What we are going to build in this section
Defining how big our map will be, and saving that information in the Game class
Prepopulating all rooms in the map
Keeping track of the player's location, and limiting movement to the current map
Challenge: verifying our logic when checking player movement
Solution to challenge
Trying out our code and updating our position on the map
Keeping track of player movement
Implementing a (partially functional) "map" command
Making the map function more useful
Finalizing the "map" command
Adding a status bar
Challenge: revise welcome text to explain why players have no weapons or armor
Solution to challenge
Finishing up the game logic
Introduction
Introduction
Installing Python (Macintosh)
Installing Python (Windows)
Installing the PyCharm CE
Python resources and documentation
How to ask for help
Is Python interpreted, compiled, or both?
Getting Started with Python and our adventure game
The obligatory "Hello, World!" program
Preview
The structure of a Python Program
An aside: Python's basic data types
Where to put variables: scope
Getting started with our adventure game
Another aside: functions
Implementing a while loop to keep the program running
Reading from the terminal
Making decisions based on user input
An aside: Python's comparison operators
Printing help and sanitizing user input
Spicing things up with colour
Making the Game functional with Classes
Python Classes
The Player class
The Room class
The Game class
Using our classes, and getting started with game movement
Using a new data type, tuples, to help with room descriptions
Navigating around the labyrinth
An aside: the dictionary data structure
Showing items and monsters
implementing an Inventory
Lists, and adding a list to the Player class for inventory items
Getting started with picking items up
Completing the functionality for picking items up
Displaying the current inventory
An aside: more about looping
Cleaning up game play by printing room descriptions only when necessary
Dropping items
Equipping items
Showing equipped items, and a challenge
Solution to challenge
Unequip an item
Implement the "status" command, to show the player how they are doing
An aside: different ways of printing strings with variables
Implementing a turn-based combat system
How combat will work
Giving the player a chance to fight or flee
Starting combat: "rolling for initiative"
Player's turn
Monster's turn
Warning the player when their health is low
Adding XP, incrementing the number of monsters defeated, and awarding gold
Adjusting the attack roll based on weapon, armor, shield, and monster type
Letting a player rest to regain health
Keeping track of player location using a map
What we are going to build in this section
Defining how big our map will be, and saving that information in the Game class
Prepopulating all rooms in the map
Keeping track of the player's location, and limiting movement to the current map
Challenge: verifying our logic when checking player movement
Solution to challenge
Trying out our code and updating our position on the map
Keeping track of player movement
Implementing a (partially functional) "map" command
Making the map function more useful
Finalizing the "map" command
Improving the game interface
Adding a status bar
Challenge: revise welcome text to explain why players have no weapons or armor
Solution to challenge
Finishing up the game logic
×
This is an unpublished lesson. This lesson will not be shown for students unless you set it as Public.
Back to Dashboard
No contents are available in this lesson!
No lessons available !
Back to Dashboard
Lesson contents locked
Enroll to unlock this lesson.
Enroll to unlock
Next Lesson