From 3d956ccf474d0415eab301493f14c580f3ceae9b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 25 Nov 2019 16:00:44 -0500 Subject: [PATCH] Fixed up the winning time announcement. --- README.md | 4 +++- numnastics | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 888ab44..cfccfec 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ released under the terms of the WTFPL http://wtfpl.net/ Requirements sox bash version 4 or greater -TTYtter (optional) +pygame +python-xdg +python-requests Playing You are given a scrambled list of numbers from 1 to 9. Press the number you want to flip from, and that number, plus all the numbers after it will reverse. the object of the game is to get the numbers in the right order, 123456789, in as few tries as possible. diff --git a/numnastics b/numnastics index d38529a..5e07969 100755 --- a/numnastics +++ b/numnastics @@ -49,7 +49,7 @@ def game(mode): endTime = round(time.time() - startTime, 2) message = [ "Congratulations! You beat Numnastics in " + str(tries) + " tries.",\ - "Your time was " + str(endTime) + " seconds."] + "Your time was " + str(int(endTime / 60)) + "minutes and " + str(round(endTime % 60, 2)) + " seconds."] display_message(message) sounds['win'].play() time.sleep(sounds['win'].get_length())