tumblr-game 1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Main +2 -1
  3. data/lib/tumblr-game.rb +18 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8c5aa349b00c8e8b2a2185331c54f2b1a8a9a9a
4
- data.tar.gz: 6fc1a04a12e7339c1d7ec85ce6ae22b7482f4ded
3
+ metadata.gz: 5900c177c6240588cebbc1bb220d87dcf8f8b062
4
+ data.tar.gz: 9e0dc855bb9e3a0eb035453ff42c0c1f8d131535
5
5
  SHA512:
6
- metadata.gz: ff51b843955a286a7568943b660b6daac3f7de97177c2c9f92433204bb6623bc85aba6b747277f4b1ffb24b7d9d6ac7b84e921b70305b7c3ab4104b62ad386c3
7
- data.tar.gz: 72fa9e102e47ed2ae584d87045d7481d88c9bae528fc1290d6bf79d63b18e212480e9a12d9e110e8ea819360841c30ea7a53e02e43aaa7e651ae3e2ff3b216db
6
+ metadata.gz: cd84dc14e57668cd86cc8558719b83c3fa8cc2a9549b2c0a219f665a94011615116597aab8b59f545d1425d1c9abc8b00455230685e127ab814c9c5873f2db99
7
+ data.tar.gz: 1097388d67f7b0bd6bdbb3563c0e59a3851dde33fcd379231b6ed95aef537364de6df63f922e8d3e759778f3282c060a84086080bb4fd5e845bb8fa52929c546
data/bin/Main CHANGED
@@ -2,4 +2,5 @@
2
2
  require 'tumblr-game'
3
3
 
4
4
  myGame = Game.new(1250, 900)
5
- myGame.start
5
+ myGame.start
6
+ myGame.delete
data/lib/tumblr-game.rb CHANGED
@@ -3,11 +3,14 @@ require_relative 'tumblr-game/tumblr.rb'
3
3
 
4
4
  class Game
5
5
 
6
+ ## this function will accept the dimensions of the window to be created and initialize a Game object
6
7
  def initialize(w, h) # dimensions of 1250 x 900 are appropriate
7
8
  @width = w
8
9
  @height = h
9
10
  end
10
11
 
12
+ ## this function will get the name of the blog from the user, and attempt to use the Tumblr API to query for pictures.
13
+ # if there is an error with the user input, say if it is empty or the blog is invalid, the game ends. the user must then re-execute the ruby file
11
14
  def start
12
15
  # ask for user input to get the blog name
13
16
  puts "Enter the name of the blog: "
@@ -30,4 +33,19 @@ class Game
30
33
  end
31
34
  end
32
35
  end
36
+
37
+ ## this function will delete the files that have been made over the course of the game. this must be called after Game.start in the main program file
38
+ def delete
39
+ File.delete( File.join(Dir.home, 'Desktop/image1.png'),
40
+ File.join(Dir.home, 'Desktop/image2.png'),
41
+ File.join(Dir.home, 'Desktop/image3.png'),
42
+ File.join(Dir.home, 'Desktop/image4.png'),
43
+ File.join(Dir.home, 'Desktop/image5.png'),
44
+ File.join(Dir.home, 'Desktop/image6.png'),
45
+ File.join(Dir.home, 'Desktop/image7.png'),
46
+ File.join(Dir.home, 'Desktop/image8.png'),
47
+ File.join(Dir.home, 'Desktop/image9.png'),
48
+ File.join(Dir.home, 'Desktop/image10.png')
49
+ )
50
+ end
33
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tumblr-game
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Canero