tumblr-game 0.0.1 → 0.0.2
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: 27539715cbc33100dbe473f863ac11d6b69c3996
|
4
|
+
data.tar.gz: 8748602b050795294951affc32065892a1a08372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86fc2122f002ff72a8d21d4e024392613dc97d4c22a2f4cd1b411ac7588b15e29a7c81218136c756e45b4ecc59e29becfdd6f3c390b453402b51911f85d332b0
|
7
|
+
data.tar.gz: 698f36f9fb751482392b5224a685945714b64b4ffd99eef0d97364a7f0e24b176e5578257307f5e7f67275eb9e42c1ff66bf4d78ea54c55252881c4eb5788345
|
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
|
-
'image1.png' => 0,
|
65
|
-
'image2.png' => 1,
|
66
|
-
'image3.png' => 2,
|
67
|
-
'image4.png' => 3,
|
68
|
-
'image5.png' => 4,
|
69
|
-
'image6.png' => 0,
|
70
|
-
'image7.png' => 1,
|
71
|
-
'image8.png' => 2,
|
72
|
-
'image9.png' => 3,
|
73
|
-
'image10.png' => 4 ]
|
64
|
+
'../../resources/image1.png' => 0,
|
65
|
+
'../../resources/image2.png' => 1,
|
66
|
+
'../../resources/image3.png' => 2,
|
67
|
+
'../../resources/image4.png' => 3,
|
68
|
+
'../../resources/image5.png' => 4,
|
69
|
+
'../../resources/image6.png' => 0,
|
70
|
+
'../../resources/image7.png' => 1,
|
71
|
+
'../../resources/image8.png' => 2,
|
72
|
+
'../../resources/image9.png' => 3,
|
73
|
+
'../../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, "check.png", true)
|
91
|
-
img0 = Gosu::Image.new(self, "tumblr.png", true) #the back of each card
|
90
|
+
chk = Gosu::Image.new(self, "../../resources/check.png", true)
|
91
|
+
img0 = Gosu::Image.new(self, "../../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
|
-
'image1.png' => 0,
|
55
|
-
'image2.png' => 1,
|
56
|
-
'image3.png' => 2,
|
57
|
-
'image4.png' => 3,
|
58
|
-
'image5.png' => 4,
|
59
|
-
'image6.png' => 0,
|
60
|
-
'image7.png' => 1,
|
61
|
-
'image8.png' => 2,
|
62
|
-
'image9.png' => 3,
|
63
|
-
'image10.png' => 4 ]
|
54
|
+
'../../resources/image1.png' => 0,
|
55
|
+
'../../resources/image2.png' => 1,
|
56
|
+
'../../resources/image3.png' => 2,
|
57
|
+
'../../resources/image4.png' => 3,
|
58
|
+
'../../resources/image5.png' => 4,
|
59
|
+
'../../resources/image6.png' => 0,
|
60
|
+
'../../resources/image7.png' => 1,
|
61
|
+
'../../resources/image8.png' => 2,
|
62
|
+
'../../resources/image9.png' => 3,
|
63
|
+
'../../resources/image10.png' => 4 ]
|
64
64
|
|
65
65
|
i = 0
|
66
66
|
imgNames.each_key do |imgN|
|