So let's go ahead and introduce a couple other capabilities so that we can finally start writing programs that maybe print out charts or interact with the user, play games, or the like.
让我们继续来介绍其他几个功能,以便我们最终能开始写程序,那样可以打印图表或与用户交互,打游戏之类的。
You can even implement your own versions of some of the most popular console games today for which I need another volunteer.
现在你就可以编写程序,把当下最流行的控制台小游戏,改造成自己的版本,现在我需要再上来一名志愿者。
They build them, they do what if games, they play with them, and then they try and adjust them to get them right The nice thing here is, you can decide whether you believe momentum and see what it would mean, or not mean, etc.
他们实现建立程序,他们去做“要是“游戏,他们不断尝试,然后他们不断调整最终得到正确结果,最好的一件事就是,你可以决定你是否相信这个股票势头,看看它到底意味着什么或根本没有意义。
And indeed, when they program these things, the programmers will feed in game after game after game of the great chess games in history.
的确,当人们编写游戏程序时,会在这些程序中,一局接一局地,输入历史上那些最伟大的棋局
And this is useful because if you're actually writing a program that's interactive or that you want to change overtime much like you would a game, hopefully, the game is not going to have the bad guys, for instance, always standing in the same place or the rocks or whatever it is falling from the sky in the same place 'cause it would very quickly become a very tedious game.
这是很有用的,因为如果,写一个交互的程序或者,希望每次游戏都不一样,我们希望,游戏中的坏人物,别老是站在同一个地方或者同一块石头上,或者从天空中同样的位置落下,因为这立刻会使游戏变得乏味。
I probably whip out a do while loop very rarely, but very often when programming games or any program that takes user input and has to check that user input and yell at the user if they're messing with you or aren't providing what's expected.
我可能很少用do,while,循环,但常常是,当编制程序游戏或需要用户输入的程序是,需要检查用户的输入并提醒用户,如果他们干扰了你,或没有提供所期望的输入。
应用推荐