Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Broken choices
#1
I'm doing a code along by Joseph Delgadillo, and this is a first exposure level course.

The recorded code along used Python ver. 3.6.x

I am using Python ver. 3.9.x

This is located in the main file, beginning on line 50 and continuing until line 117. The script does run, and I can select an option that it will print out the results for on player3, but this does not happen for player1, or player2. I'm not sure why it's passing over my first two Person object's (player1, and player2) input choices. I can select any option, but the code doesn't return the results of those Person object's actions.

Edit: This also might have something to do with the imported Person class; located on line 60 of the Game file is the choose_action function, which seems like it might be relevant.


Game

Inventory

Magic

Main file
Reply
#2
As an alternative, there's an excellent game tutorial on this forum by Metulburr, here's the list of lessons if interested:
Scooze likes this post
Reply
#3
(Oct-18-2020, 09:08 AM)Larz60+ Wrote: As an alternative, there's an excellent game tutorial on this forum by Metulburr, here's the list of lessons if interested:

This is a paid for course I'm currently doing, and would like to just understand why the code broke in the first place. It was only like $2, but I feel like it's important I solve this issue. Thanks for the suggestion I guess, but that doesn't contribute to my thread or question.

I don't really want to scrap and start over but it seems like I'll be having to do that if I want my answer.
Reply
#4
Perhaps you should contact Joseph Delgadillo and ask the same question.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020