首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

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

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

  • 资源大小:2.45 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: C# c++

资 源 简 介

面这段代码模拟了龟兔赛跑爬山的情况,其中有个时钟触发设置每秒执行一次循环,乌龟的规则是: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

文 件 列 表

龟兔赛跑的小游戏.doc
VIP VIP
0.179447s