Update applications/lottery/lottery.ring - Better code!
@@ -223,15 +223,11 @@ func pUserClick Row,Col
func lotteryDraw
- if user = 1
- return
- ok
+ if user = 1 return ok
if user = 2
PairsXY = newlist(size*size,2)
-
randList = 1:6
randList = randomList(randList)
-
for n = 1 to size
for m = 1 to size
ind = (n-1)*size + m
@@ -239,7 +235,6 @@ func lotteryDraw
PairsXY[ind][2] = m
next
next
-
for nr = 1 to limit
rand1 = random(len(randList)-1)+1
if len(randList) = 1
@@ -272,16 +267,10 @@ func newGame
for m = 1 to size
Button[n][m].setStylesheet(C_StyleGray)
Button[n][m].setenabled(true)
- next
- next
-
- for n = 1 to size
- for m = 1 to size
Lottery[n][m] = 0
next
next
-
func timerMan
nowTime = ceil( (clock() - time1) / 1000 )
