超级源代码免费赠送!快,只送10套~!(200分)

F

Funnysl

Unregistered / Unconfirmed
GUEST, unregistred user!
本人有磁盘恢复系统全部源代码一套.此套程序注册费为:150$!!!,这并不包括源代码!
现免费赠送源代码!
软件exe文件下载地址
http://www.cs.swufe.edu.cn/rescue.rar(教育网)
请需要者与我联系.我的emai:funnysl@sina.com
条件:11月21日12:00之前做好如下程序(我保证很简单!)
聪明的23根火柴游戏程序:
编写一个和计算机对弈的游戏。计算机为一方,游戏者为一方。规则为:
a. 初始时有23根火柴。
b. 游戏者开始移走火柴,数目为:1、2、3。越界犯规,判为输。
c. 计算机以同样的规则移走火柴。
d. 多次重复,抽到最后一根火柴者为输。
要求:为了保证计算机一方有胜算,应使程序能够理解如下分析结果:在对弈
过程中,给对手留下2、3、4、6、7、8… …对自己是危险的,而给对手留下1、
5、9… …则自己是安全的。
注意:要求用Delphi编写,取火柴的时候要有动画效果以及声音效果.

请要拿源代码的人快些行动!

如果上面连接下载不了,也可以Email我,我给你发过去.

 
我在把难度降低,我这里有一个可以运行的C的源程序,大家可以参考!!


#include <stdio.h>
#include <stdlib.h> /*调用随机函数rand(),所要包含的头文件*/
#define man 1 /* 1代表人*/
#define cpt 0 /* 0代表电脑*/
void main(){
void match_game(void); /*函数声明*/
char select; /*定义选择变量select*/

printf("This is a match game(There is 23 match on the desk):/n");
printf("/n");
printf("The rule :/n");
printf("1:In each time,you can only get 1~3 match,or you are failed/n");
printf("2:You and the computer get the match by turns/n");
printf("3:In each time,the computer can only get 1~3,or you are winner/n");
printf("4:If you get the last match,the computer is winner, or you are winner/n");/*游戏说明*/

printf("/n");
printf("When you start play the game,please 'return'/n");/*开始游戏时请回车*/
getchar();
do{ clrscr(); /*清屏*/
match_game(); /*调用函数match_game*/
printf("Do you want to play again?(y//n)/n"); /*是否重来一次*/
getchar();
select=getchar();
}while(select=='y'); /*选择变量select为y时,循环调用match_game*/
}
void match_game(){
int match_n=23; /*定义桌子上火柴数,并赋予初值23*/
int man_n; /*定义人每次所取火柴数*/
int computer_n; /*定义电脑每次所取火柴数*/
int last=man; /*定义最后取到火柴变量,并赋予初值man*/
printf("There is 23 match on the desk/n");
while(match_n>1){ /*当桌子上火柴数大于1时,循环*/
printf("How many match do you get?/n",match_n);
scanf("%d",&man_n); /*人每次所取火柴数*/
if(man_n>3||man_n<1||man_n>=match_n)break; /*当人所取火柴数不在1~3范围,或者大于桌子上
火柴数时,跳出循环*/
match_n-=man_n; /*桌子上火柴数match_n减去man_n*/
last=cpt; /*最后一根火柴变量赋予值电脑cpt*/
/*以下为电脑取火柴*/

if(match_n==1)break; /*如果桌子上火柴剩下一根,跳出循环*/
if((match_n-1)%4==0)computer_n=rand()%3+1; /*如果桌子上火柴数被4整除余1,则电脑没有必胜把握
随机取出1~3根火柴*/

else computer_n=(match_n-1)%4; /*否则电脑取出火柴数(match_n-1)%4,使得桌子上所剩
火柴数被4整除余1,如此循环电脑必胜*/
printf("The computer get %d match/n",computer_n); /*输出电脑所取火柴数*/
match_n-=computer_n; /*桌子上火柴数match_n减去computer_n*/
printf("There is %d match on the desk/n",match_n);
last=man; /*最后一根火柴变量赋予值人man*/
}
if(last==man)printf("The winner is computer/n"); /*如果最后一根变量是人man,则电脑胜*/
else printf("You are winner/n"); /*否则则玩家胜*/
}

 
我对兄弟的 代码不敢兴趣(说实话,俺也能写,不过没有看不起兄弟的意思),
但是我对兄弟的游戏感兴趣,把你的规则再说一次,详细一些,总感觉你说得不够明白。
a. 初始时有23根火柴。
b. 游戏者开始移走火柴,数目为:1、2、3。越界犯规,判为输。
c. 计算机以同样的规则移走火柴。
d. 多次重复,抽到最后一根火柴者为输。

我做一种假设。
如果我先拿,计算机后拿,那么 第一次 我可以那几个, 计算机呢,第二次呢,
说清楚一点。谢谢!
 
为何自己不搞
 
人和计算机每次都只能拿1或2或3个,除了这几个数拿别的都判输.

兄弟,帮帮忙,帮我写一个吧!我实在没有时间写!

谢谢谢!!!!!!!!!!!!11
 
我没时间呀!!!!!!!!!!!!!!!!!
 
不想多说, 这个真的太简单了..
建议你能够自己想一想
 
joechl@yeah.net
谢谢
 
我知道这个真的很简单,而且我的算法也给了,可是我真的没有时间呀.


请帮忙!谢谢!
 
晕,我看不懂啊.我是新手,大家见谅.只有多多提问了,请大家多帮助了.




= ICEsting =
 
真的希望大家能帮帮我呀!各位大侠,这里还有200分呀!
 
谢谢!◎^_^
 
顶部