登录
首页 » C# » 面这段代码模拟了龟兔赛跑爬山的情况,其中有个时钟触发设置每秒执行一次循环,乌龟的规则是:50% 的机会快走(右移三格) 20% 的机会下滑(左移六格) 30%...

面这段代码模拟了龟兔赛跑爬山的情况,其中有个时钟触发设置每秒执行一次循环,乌龟的规则是:50% 的机会快走(右移三格) 20% 的机会下滑(左移六格) 30%...

于 2022-05-21 发布 文件大小:2.45 kB
0 105
下载积分: 2 下载次数: 1

代码说明:

面这段代码模拟了龟兔赛跑爬山的情况,其中有个时钟触发设置每秒执行一次循环,乌龟的规则是:50% 的机会快走(右移三格) 20% 的机会下滑(左移六格) 30% 的机会慢走(右移一格). 兔子的规则是:20% 的机会睡觉(不移动) 20% 的机会大跳(右移九格) 10% 的机会大滑(左移十二格) 30% 的机会小跳(右移一格) 20% 的机会小滑(左移两格). 其中最先走到整 70 格的胜利,超过 70 格的从头开始 程序在一条线上打印了龟兔移动的轨迹,当两者重合时打印 P 乌龟用 G 表示,兔子用 T 表示. -face this code to simulate the hand of the mountain, which has a clock installed trigger the implementation of a second cycle of the turtle is a rule : 50% chance of brisk walking (3 Georgia shift to right) 20% chance of decline (6 bits grid) 30% chance of walking (a shift to right field) . rabbit is a rule : 20% of the opportunity to sleep (mobile) 20% chance of play (9 Georgia shift to right) 10% of the opportunities in Waterloo (12 bits grid) 30% chance of a small jump (shift to right a grid) 20% chance of a small slip (2 bits grid). One of the most first come the whole grid of 70 victories, more than 70 grid start again from scratch in a process of the turtles online print rabbit mobile track, when the two P Print coincides wit

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • GAUSS-JORDAN
    gauss jordan method. not my own program but i just want to share it.
    2012-09-30 09:32:51下载
    积分:1
  • ActiveObjectExam
    使用symbian 创建一个定时器主要应用的是活动对象。(Create a timer using the symbian application is the main active object.)
    2016-04-22 12:11:13下载
    积分:1
  • Tomographic-forward-modeling
    层析成像单边激发单边接收 正演程序算法 对地球物理学子很有帮助 多多学习和交流(Tomographic imaging unilateral single side to receive the forward algorithm of the earth physics students are very helpful to learn and exchange)
    2016-04-28 20:47:43下载
    积分:1
  • c# 饼形图分析公司男女比例 附源码
    c# 饼形图分析公司男女比例 附源码
    2013-05-15下载
    积分:1
  • ODBC
    ODBC编程实例,使用ODBC对基于开关量数据采集卡的通信接口设计与实现。(ODBC programming examples, using ODBC for data acquisition card based digital communications interface design and implementation.)
    2013-07-14 13:16:35下载
    积分:1
  • OPENGLWaterfirelava
    用opengl实现水纹、岩浆及火焰的实例,工程位图等全部文件(Watermark with opengl implementation, examples of magma and fire, engineering and all other bitmap files)
    2021-01-25 21:58:42下载
    积分:1
  • commLTETurboDecoder
    lte decoder in matlab
    2020-11-05 19:59:50下载
    积分:1
  • AudioG711
    G711标准的语音编解码算法。以便于对语音信号进行大量存储(speech coding)
    2010-10-10 20:15:03下载
    积分:1
  • source_code
    说明:  指纹识别源代码,C语言编写,简单易用,便于自学。(finger recognition source code)
    2010-04-05 11:00:01下载
    积分:1
  • SSeparately_be
    基于小波变换的分开—合并图像分割matlab.采用多尺度小波变换系数作为四分树结构的分开一合并法图像分割的一致性度量 从而在大的图像块中。。去除噪声的影响,在小的图像块中,以小波变换的局部极大值精确定位边缘,根据边缘信息进行分开一合并法图像分割 .实验表明.算法得到满意的结果 . (Separately based on wavelet transform- merge image segmentation Matlab. Multi-scale wavelet transform coefficients as the quadtree structure separate consolidation method of image segmentation consistency measure large image block. . To remove the effects of noise, in small image blocks, the local maxima of the wavelet transform precise positioning edge, to separate a combined method for image segmentation according to the edge information. Experiments show. Algorithm to obtain satisfactory results.)
    2012-09-30 19:33:45下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载