免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: crulat
打印 上一主题 下一主题

[游戏娱乐] 【原创C|Go|C++|Shell版俄罗斯方块】(新算法、新思想、无限拓展) [复制链接]

论坛徽章:
0
61 [报告]
发表于 2011-12-06 10:14 |只看该作者
这个真的是很强大的说。

论坛徽章:
0
62 [报告]
发表于 2011-12-06 11:26 |只看该作者
牛人 。。就是强!

论坛徽章:
0
63 [报告]
发表于 2011-12-06 13:18 |只看该作者
这么强。mark学习。

论坛徽章:
0
64 [报告]
发表于 2011-12-12 01:26 |只看该作者
Tetris Game  Version 3.0  Beta2已发布!

论坛徽章:
0
65 [报告]
发表于 2011-12-12 08:48 |只看该作者
顶啊

论坛徽章:
0
66 [报告]
发表于 2011-12-12 14:10 |只看该作者
膜拜

论坛徽章:
0
67 [报告]
发表于 2011-12-12 14:56 |只看该作者
The shape of the tetris is highly Customization, some of the shape are hard to fill up , this is the challenge and pleasure!
If you want to play the game more easily, just change the range of the ID of the boxes in a continuous range: from box0 to boxUPLIMIT, and change the value of of the num in $((RANDOM/num)), while num is the smallest number that can guarantee the value of $((RANDOM/num)) isn't greater than UPLIMIT when RANDOM is 32767! For instance, the current id of the boxes is from box0 to box27, and 1171 is the smallest number that can guarantee: 0 ≤ $((RANDOM/1171)) ≤ 27, as 32767/1171=27, and 32767/1170=28!

论坛徽章:
0
68 [报告]
发表于 2011-12-14 12:25 |只看该作者

  1. #!/bin/bash
  2.       
  3. for((i=32767/${1}; i>0; --i))
  4. do
  5.          if (( 32767/i == ${1} && 32767/(i-1) == ${1}+1 )); then
  6.                echo ${i}
  7.                exit
  8.          fi
  9. done
复制代码

论坛徽章:
0
69 [报告]
发表于 2011-12-14 14:32 |只看该作者
  拜膜   一定要好好研究一下

论坛徽章:
0
70 [报告]
发表于 2011-12-15 12:52 |只看该作者
好给力!必须顶一个!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP