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

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");
/*否则则玩家胜*/
}
 
有C程序翻译一下倒不难,呵呵。有空可以看看。
 
TO: kkyy
大侠帮帮忙呀,我很急呀!!!!

谢谢!!!!
 
200分,没人要呀!
 
给我一套,谢谢
Jetchin@263.com
 
谢谢!
micro@garland.21cn.com
 
cgh1970@etang.com
 
来了,来了。[:D]
dream40@etang.com
 
icank@163.com
谢谢!
 
你把getchar();
改为事件驱动,其它的按原来的逻辑改就行了呀,一点点语庋的小差别,应该不会难倒你吧。
 
我给你发过去了,基本功能都有了,还可以再改,时间有的话!!
 
谢谢各位的关注!!
可是还没有人真的做的好呀!
TO chenyscar,
好像有些问题呀,我已经给你邮件了!
我把源代码也给你了!
 
接受答案了.
 
顶部