Added if __name__ == "__main__": check.

This commit is contained in:
Sheldon Lee 2020-09-10 09:50:59 +00:00
parent ea3f4e0a7c
commit 5d40aaa363

View File

@ -48,6 +48,7 @@ class HangFish():
def getString(self): def getString(self):
return self.graphical_string + 'guesses left = {}\n'.format(self.guesses) + self.graphical_progress_string return self.graphical_string + 'guesses left = {}\n'.format(self.guesses) + self.graphical_progress_string
def main():
hangFish = HangFish(None, "Gen") hangFish = HangFish(None, "Gen")
print(hangFish.getString()) print(hangFish.getString())
@ -60,3 +61,6 @@ while (hangFish.running):
print("Please enter a letter.") print("Please enter a letter.")
print (hangFish.status_message) print (hangFish.status_message)
if __name__ == "__main__":
main()