文件名称:Penalties-game
-
所属分类:
- 标签属性:
- 上传时间:2015-05-12
-
文件大小:540byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
先说一下方向的设定。我的想法比较简单,就是左中右三个方向,用字符串来表示。射门或者扑救的时候,直接输入方向。所以这里我准备用raw_input。有同学是用1-8的数字来表示八个方向,每次输入一个数字,这也是可以的。不过这样守门员要扑住的概率可就小多了。
至于电脑随机挑选方向,如果你是用数字表示,就用我们之前讲过的randint来随机就行。不过我这次打算用random的另一个方法:choice。它的作用是从一个list中随机挑选一个元素。
-Let me talk about setting direction. My idea is simple, that is, three directions left, right, represented by the string. Shooting or fighting when direct input direction. So here I am ready to use raw_input. Some students with 1-8 numbers to represent the eight directions, each time you enter a number, it is possible. However, this probability goalkeeper Puzhu may be much smaller.
As for the computer randomly selected direction, if you are using a digital representation, on the line to use before we talked about the randint randomly. But this time I intend to use another method of random: choice. Its role is randomly selected a list of one element.
至于电脑随机挑选方向,如果你是用数字表示,就用我们之前讲过的randint来随机就行。不过我这次打算用random的另一个方法:choice。它的作用是从一个list中随机挑选一个元素。
-Let me talk about setting direction. My idea is simple, that is, three directions left, right, represented by the string. Shooting or fighting when direct input direction. So here I am ready to use raw_input. Some students with 1-8 numbers to represent the eight directions, each time you enter a number, it is possible. However, this probability goalkeeper Puzhu may be much smaller.
As for the computer randomly selected direction, if you are using a digital representation, on the line to use before we talked about the randint randomly. But this time I intend to use another method of random: choice. Its role is randomly selected a list of one element.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Penalties game
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.