文件名称:nim-game
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:257.05kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
nim小游戏 可在dos系统下与计算机玩游戏
让计算机和人较量.在10到100之间生成一个随机数作为初始的石子数目.然后,随机产生0或1,以决定是计算机先玩还是人先玩.然后,再随机产生0或1,以决定计算机采用"聪明"还是"愚蠢"模式.在愚蠢模式中,在轮到计算机时,简单地取走随机数目(介于1到n/2之间)的石子 在聪明模式中,计算机每次取走一定数目的石子,使得剩下的石子数目是2的某次幂减1,例如3,7,15,31,63.这总是可行的,除非当前的石子数正好是2的某次幂减1.在这种情况下,计算机取走随机数目的石子.-nim game system in the dos and computer games to computers and people to compete. 10 to 100, generates a random number between the stones as the initial number. Then, random 0 or 1, to decide whether to play or the first computer people get to play. Then, again randomly generated 0 or 1, to determine the computer using " smart" or " stupid" mode. in stupid mode, turn the computer on, the simple removal of random number (between 1 and n/between 2) the stones in smart mode, the computer each time a certain number of stones removed, making the number of remaining stones of a power of 2 minus 1, for example, 3,7,15,31,63. This total is feasible, unless the current is just a few stones of a power of 2 minus 1. In this case, the computer random number of stones removed.
让计算机和人较量.在10到100之间生成一个随机数作为初始的石子数目.然后,随机产生0或1,以决定是计算机先玩还是人先玩.然后,再随机产生0或1,以决定计算机采用"聪明"还是"愚蠢"模式.在愚蠢模式中,在轮到计算机时,简单地取走随机数目(介于1到n/2之间)的石子 在聪明模式中,计算机每次取走一定数目的石子,使得剩下的石子数目是2的某次幂减1,例如3,7,15,31,63.这总是可行的,除非当前的石子数正好是2的某次幂减1.在这种情况下,计算机取走随机数目的石子.-nim game system in the dos and computer games to computers and people to compete. 10 to 100, generates a random number between the stones as the initial number. Then, random 0 or 1, to decide whether to play or the first computer people get to play. Then, again randomly generated 0 or 1, to determine the computer using " smart" or " stupid" mode. in stupid mode, turn the computer on, the simple removal of random number (between 1 and n/between 2) the stones in smart mode, the computer each time a certain number of stones removed, making the number of remaining stones of a power of 2 minus 1, for example, 3,7,15,31,63. This total is feasible, unless the current is just a few stones of a power of 2 minus 1. In this case, the computer random number of stones removed.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
nim 游戏/Debug/Main.obj
nim 游戏/Debug/Nim.exe
nim 游戏/Debug/Nim.ilk
nim 游戏/Debug/Nim.obj
nim 游戏/Debug/Nim.pch
nim 游戏/Debug/Nim.pdb
nim 游戏/Debug/vc60.idb
nim 游戏/Debug/vc60.pdb
nim 游戏/Main.cpp
nim 游戏/Nim.cpp
nim 游戏/Nim.dsp
nim 游戏/Nim.dsw
nim 游戏/Nim.h
nim 游戏/Nim.ncb
nim 游戏/Nim.opt
nim 游戏/Nim.plg
nim 游戏/Debug
nim 游戏
nim 游戏/Debug/Nim.exe
nim 游戏/Debug/Nim.ilk
nim 游戏/Debug/Nim.obj
nim 游戏/Debug/Nim.pch
nim 游戏/Debug/Nim.pdb
nim 游戏/Debug/vc60.idb
nim 游戏/Debug/vc60.pdb
nim 游戏/Main.cpp
nim 游戏/Nim.cpp
nim 游戏/Nim.dsp
nim 游戏/Nim.dsw
nim 游戏/Nim.h
nim 游戏/Nim.ncb
nim 游戏/Nim.opt
nim 游戏/Nim.plg
nim 游戏/Debug
nim 游戏
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.