Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
heyunpeng committed Aug 24, 2015
1 parent 753bd0e commit 7172da3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/initializers/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def checkGrid (object)
loopCount = 0

begin
localcoin = totalcoin
localcoin = (totalcoin).abs * 0.95
Rails.logger.debug localcoin
localgrid = randomGrid
prizetotal = 0
lssame, lsorder, lsdouble, lscolor = checkGrid(localgrid)
Expand Down Expand Up @@ -246,10 +247,11 @@ def checkGrid (object)

localcoin -= prizetotal
loopCount += 1
Rails.logger.debug localcoin

if localcoin >= 0 or loopCount > 99 then
globalgrid = localgrid
totalcoin = localcoin
totalcoin += localcoin
break
end
end while true
Expand Down

0 comments on commit 7172da3

Please sign in to comment.