tumblr-game 0.0.7 → 0.0.8
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 +12 -12
- data/lib/tumblr-game/tumblr.rb +10 -10
- 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: 3d509caafcfcee692bfa0d13819a3fad74d7e67b
|
4
|
+
data.tar.gz: 9b6c2bb303fbf9271cbbcb3b70587a4f8d43397a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c0bff303123812e18586b4eb5957c5e7dbd71599795f2bac8dceea67a49284a608ed07448c5e47f4496658d5069fd7dba59cd582feb3665177e12cf28d46e5c
|
7
|
+
data.tar.gz: 75439c46f57c5d1a8267bed0ab5dba6e9b1dab437bf61cefc5b045a6e5398aa1fdf062f0e509359f54c87787ec47528484e630d45acc3bb84fe903722188bf94
|
data/lib/tumblr-game/gosu.rb
CHANGED
@@ -61,16 +61,16 @@ class MyWindow < Gosu::Window
|
|
61
61
|
|
62
62
|
# create a hash of the image names that we are using along with their associated id
|
63
63
|
imgNames = Hash[
|
64
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
65
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
66
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
67
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
68
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
69
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
70
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
71
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
72
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
73
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
64
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image1.png') => 0,
|
65
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image2.png') => 1,
|
66
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image3.png') => 2,
|
67
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image4.png') => 3,
|
68
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image5.png') => 4,
|
69
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image6.png') => 0,
|
70
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image7.png') => 1,
|
71
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image8.png') => 2,
|
72
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image9.png') => 3,
|
73
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image10.png') => 4 ]
|
74
74
|
|
75
75
|
## Durstenfield's Shuffling Algorithm
|
76
76
|
# convert the hash from above into a two-dimensional array that will be shuffled in order to
|
@@ -87,8 +87,8 @@ class MyWindow < Gosu::Window
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# create the Gosu images so they can be put in to each Tile object
|
90
|
-
chk = Gosu::Image.new(self, File.join(File.dirname(File.expand_path(__FILE__)), '
|
91
|
-
img0 = Gosu::Image.new(self, File.join(File.dirname(File.expand_path(__FILE__)), '
|
90
|
+
chk = Gosu::Image.new(self, File.join(File.dirname(File.expand_path('../..', __FILE__)), '/resources/check.png'), true) # completion image
|
91
|
+
img0 = Gosu::Image.new(self, File.join(File.dirname(File.expand_path('../..', __FILE__)), '/resources/tumblr.png'), true) # the back of each card
|
92
92
|
img1 = Gosu::Image.new(self, imgArr[0][0], true)
|
93
93
|
img2 = Gosu::Image.new(self, imgArr[1][0], true)
|
94
94
|
img3 = Gosu::Image.new(self, imgArr[2][0], true)
|
data/lib/tumblr-game/tumblr.rb
CHANGED
@@ -51,16 +51,16 @@ class TumblrAPIObject
|
|
51
51
|
# FUTURE GOAL: INSTEAD OF COPYING EACH IMAGE ONCE, CHANGE THIS FUNCTION TO JUST OPEN THE 5 IMAGES.
|
52
52
|
def create_images
|
53
53
|
imgNames = Hash[
|
54
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
55
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
56
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
57
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
58
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
59
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
60
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
61
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
62
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
63
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '
|
54
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image1.png') => 0,
|
55
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image2.png') => 1,
|
56
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image3.png') => 2,
|
57
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image4.png') => 3,
|
58
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image5.png') => 4,
|
59
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image6.png') => 0,
|
60
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image7.png') => 1,
|
61
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image8.png') => 2,
|
62
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image9.png') => 3,
|
63
|
+
File.join(File.dirname(File.expand_path('../..', __FILE__)), 'resources/image10.png') => 4 ]
|
64
64
|
|
65
65
|
i = 0
|
66
66
|
imgNames.each_key do |imgN|
|