2011年1月10日

运用递归随机出与上一个数不重复的数

摘要: var count:int=0;var randomNum:int;function recursion():void{ randomNum = Math.round(Math.random() * 2 + 1); if (count != randomNum) { count = randomNum; } else { recursion(); }} 阅读全文
posted @ 2011-01-10 17:42 602147629 阅读(165) 评论(0) 推荐(0) 编辑