Set Up the Players
00:00 Let’s tackle this challenge. I’ve copy/pasted the instructions in here and formatted them just a bit so that they’re easier to read and that I can get started tackling one piece of this task at a time. Yeah, I want to play this game, but first I’ve got to write it, right?
00:35 The first one is that the game involves one player and one monster. I’m going to move this over here and create these two kind of like player instances. One is the computer, and the other one is the actual player.
player = 100 and
monster = 150 And maybe let’s be a bit more descriptive, and because we’re going to be working with their health, so I’m going to call this
monster_health. So, we have two variables, one for the player, one for the monster, and their respective health.
Become a Member to join the conversation.