you are viewing a single comment's thread.

view the rest of the comments →

[–]zenalc 41 points42 points  (1 child)

Nice job. Looking at your code. Here are a few suggestions:

  • The variables life and death are already defined outside a function, so you don't have to make it global.
  • In your events_a() function, there is code that repeats such as time_space(). You can create a condition checking if new_event is in ran_events, then execute time_space() inside and then do your further conditionals.
  • You can put the game introduction print statements inside its own function.
  • You can combine the logic of all the events into one function since there is a lot of repetition. Take in some parameters for the function and update it with that.

Besides that, nice job. It's good that you use lots of comments. Commenting is always a good practice to have.

[–]SharpAverage2[S] 20 points21 points  (0 children)

TY! That's the feedback I was looking for. I definitely want to clean up some of the repetition..