tumblr-game 0.0.6 → 0.0.7
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 +10 -10
- 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: cc2145469bb28e94f93b4dfdf29bdb2d494941fe
|
4
|
+
data.tar.gz: 4c30451a8452b485503fd5ed7c7349b14d1d042c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45bbbff68f54b1dbc0f601e2eed071213f8c0e0c44c2fad367c96ded3de2fe56e3eae1021cfb135fbb4d497ec884d6a15279501162ee062fd60c07f861ea6695
|
7
|
+
data.tar.gz: 9736a1facc89d6671919d0e20f08187cce66d33aa6844c4b430201a695c73fb62b3cfd13df820e82736b8368c2c7352cb45c983129a8faad357068234ffd3d61
|
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__)), 'image1.png') => 0,
|
65
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image2.png') => 1,
|
66
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image3.png') => 2,
|
67
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image4.png') => 3,
|
68
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image5.png') => 4,
|
69
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image6.png') => 0,
|
70
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image7.png') => 1,
|
71
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image8.png') => 2,
|
72
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image9.png') => 3,
|
73
|
-
File.join(File.dirname(File.expand_path(__FILE__)), 'image10.png') => 4 ]
|
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
|
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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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|
|