内容摘要 《使用Python发明自己的计算机游戏》将教你如何使用流行的Python编程语言制作电脑游戏——即使你以前从未编程过!从建立经典的游戏开始,如《猜数字》和《井字游戏》,然后一直到更高级的游戏,如基于文本的寻宝游戏和动画的防撞游戏。 从制作经典游戏开始,如刽子手、猜数字和井字游戏,然后再到更高级的游戏,如基于文本的寻宝游戏和带有声音效果的动画防撞游戏。在此过程中,你将学习关键的编程和数学概念,帮助你将游戏编程提高到一个新的水平。 学习如何: ·将循环、变量和流程控制语句组合成真正的工作程序 ·为工作选择正确的数据结构,如列表、字典和图元。 ·使用pygame模块为你的游戏添加图形和动画 ·处理键盘和鼠标输入 ·对简单的人工智能进行编程,这样你就可以和电脑对弈了 ·使用密码学将文本信息转换为秘密代码 ·调试你的程序并找出常见的错误 当你完成每个游戏时,你将打下坚实的Python基础和对计算机科学基础知识的理解。 你将利用Python的力量创造出什么新游戏? 本书中的项目与Python 3兼容。 Invent Your Own Computer Games with Python will teach you how to make computer games using the popular Python programming language—even if you’ve never programmed before! Begin by building classic games like Hangman, Guess the Number, and Tic-Tac-Toe, and then work your way up to more advanced games, like a text-based treasure hunting game and an animated collision-dodging game with sound effects. Along the way, you’ll learn key programming and math concepts that will help you take your game programming to the next level. Learn how to: –Combine loops, variables, and flow control statements into real working programs –Choose the right data structures for the job, such as lists, dictionaries, and tuples –Add graphics and animation to your games with the pygame module –Handle keyboard and mouse input –Program simple artificial intelligence so you can play against the computer –Use cryptography to convert text messages into secret code –Debug your programs and find common errors As you work through each game, you’ll build a solid foundation in Python and an understanding of computer science fundamentals. What new game will you create with the power of Python? The projects in this book are compatible with Python 3.
以下为对购买帮助不大的评价