tumblr-game 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tumblr-game/gosu.rb +9 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6eae8f3fd3487df7f7094732b7613635010e837
|
4
|
+
data.tar.gz: 8226b0a5a91ca3b95b2d64e0e9bfdc7402c4d3d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990f6a9fc418a8847b111abbcf6204ceb90110c7580f35e488d59edc59e6736a4a0f08f9d49e66190d92ed4cff0373084d73b645aa171d9ea7f828a32df381ab
|
7
|
+
data.tar.gz: 1e1d7a500a58cd768174e3a084975f92bd52c73d8c55ca1dd2192905525a9e59a9acc9ce04eb6062a27bc7a6f507d860b037902131cafb4781b151a9ae8922af
|
data/lib/tumblr-game/gosu.rb
CHANGED
@@ -119,13 +119,6 @@ class MyWindow < Gosu::Window
|
|
119
119
|
# this means that the user can only pick tiles when two tiles are not being displayed
|
120
120
|
# after the 96 frames of display are over, we then call the check_match function and set the frameCounter back to 0
|
121
121
|
|
122
|
-
## update the Timer object
|
123
|
-
@timer.update
|
124
|
-
|
125
|
-
if @timer.return_time == 0 then
|
126
|
-
check_win
|
127
|
-
end
|
128
|
-
|
129
122
|
if @frameCounter == 0 then
|
130
123
|
pick_tiles
|
131
124
|
elsif @frameCounter == 96 then
|
@@ -138,6 +131,14 @@ class MyWindow < Gosu::Window
|
|
138
131
|
if @phase == 1 and @pickedSecond then
|
139
132
|
@frameCounter += 1
|
140
133
|
end
|
134
|
+
|
135
|
+
## update the Timer object
|
136
|
+
@timer.update
|
137
|
+
|
138
|
+
if @timer.return_time == 0 then
|
139
|
+
check_win
|
140
|
+
end
|
141
|
+
|
141
142
|
end
|
142
143
|
|
143
144
|
## draw function. this function will draw one of the three backgrounds for the game. if the game is in the LOSE state, if the time has run out and the
|
@@ -145,7 +146,7 @@ class MyWindow < Gosu::Window
|
|
145
146
|
# board is drawn for the user to play on.
|
146
147
|
# when the user wins or loses, that screen is displayed for 120 frames and the window calls its close function to exit properly
|
147
148
|
def draw
|
148
|
-
if (!@win and @lose)
|
149
|
+
if (!@win and @lose) or (@frameCounter == 0 and @game_board.return_count < 5 and @timer.return_time == 0)
|
149
150
|
draw_lose
|
150
151
|
puts "here"
|
151
152
|
elsif (@win and !@lose)
|