Learn to Program with Python 3: A Step-by-Step Guide to Programming by Irv Kalb
Author:Irv Kalb [Irv Kalb]
Language: eng
Format: epub
Publisher: Apress
Published: 2018-09-25T00:00:00+00:00
Playing a Game Multiple Times
In most computer games, when one round of the game is over, you get the option to play again. In the output at the beginning of this chapter, I showed this option for our Guess the Number game. On a conceptual level, playing a game multiple times can be thought of as each round of the game in a loop. That is, we can build an outer loop to play multiple games, and an inner loop that plays a round within each game.
There are two possible implementations. If the game is simple enough, you can build a loop within a loop. Here is the pseudocode:#
Playing multiple games loop
Play multiple rounds of the current game
Play a round or move within a game
Ask if the user wants to play again, if not, exit
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12528)
Hello! Python by Anthony Briggs(9873)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9763)
The Mikado Method by Ola Ellnestam Daniel Brolund(9754)
Dependency Injection in .NET by Mark Seemann(9300)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8264)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7748)
Grails in Action by Glen Smith Peter Ledbrook(7673)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7523)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6767)
Microservices with Go by Alexander Shuiskov(6536)
Practical Design Patterns for Java Developers by Miroslav Wengner(6428)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6406)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6385)
Angular Projects - Third Edition by Aristeidis Bampakos(5795)
The Art of Crafting User Stories by The Art of Crafting User Stories(5320)
NetSuite for Consultants - Second Edition by Peter Ries(5260)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5081)
Kotlin in Action by Dmitry Jemerov(5025)
