awesome_game_randomizer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -37
- data/lib/awesome_game_randomizer/lotto.rb +9 -8
- data/lib/awesome_game_randomizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 489c2e1b70a2b13d49ccbaa6085ff674088d20512e7a934eb86bdfdff5bc4719
|
4
|
+
data.tar.gz: 99984e45cff48dc9d62490919495d5e1ac0bcbb49b354fde67f103a091ec4921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 985c5c65afac018aa0dcb1d7cc0522a7f8a97a7bc3fff39c0b00dedb45e2b4c6befdc88a6f020f14e8a39b1c2f8aafeb527a26cf4b616a72b9e4ac3d8c4543db
|
7
|
+
data.tar.gz: 9f81ca1841198b066aea9f4fd7a6aea91daab59277bb83436ffaaff4673da3e80426be25d3398ff4de23b8c2b72f9dd41ccd369b16b850733acccd1ee5fa645b
|
data/README.md
CHANGED
@@ -1,37 +1,27 @@
|
|
1
|
-
# AwesomeGameRandomizer
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/awesome_game_randomizer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/awesome_game_randomizer/blob/master/CODE_OF_CONDUCT.md).
|
30
|
-
|
31
|
-
## License
|
32
|
-
|
33
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
34
|
-
|
35
|
-
## Code of Conduct
|
36
|
-
|
37
|
-
Everyone interacting in the AwesomeGameRandomizer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/awesome_game_randomizer/blob/master/CODE_OF_CONDUCT.md).
|
1
|
+
# <b>AwesomeGameRandomizer</b>
|
2
|
+
|
3
|
+
##### Install awesome_game_randomizer gem
|
4
|
+
````
|
5
|
+
gem install awesome_game_randomizer
|
6
|
+
````
|
7
|
+
##### To use Gem:
|
8
|
+
````
|
9
|
+
require 'awesome_game_randomizer'
|
10
|
+
````
|
11
|
+
##### Flip a coin for heads or tails
|
12
|
+
````
|
13
|
+
AwesomeGameRandomizer::Coin.flip
|
14
|
+
````
|
15
|
+
##### Draws a random card from a 52 card deck
|
16
|
+
````
|
17
|
+
AwesomeGameRandomizer::PlayingCard.draw
|
18
|
+
````
|
19
|
+
##### Number of 6 sided dice to roll
|
20
|
+
````
|
21
|
+
AwesomeGameRandomizer::Dice.roll(20)
|
22
|
+
````
|
23
|
+
##### First number is the number of selected numbers
|
24
|
+
##### Second number is the range 1 to your number
|
25
|
+
````
|
26
|
+
AwesomeGameRandomizer::Dice.roll(20)
|
27
|
+
````
|
@@ -1,18 +1,19 @@
|
|
1
1
|
module AwesomeGameRandomizer
|
2
2
|
class Lotto
|
3
|
-
def self.pick(
|
4
|
-
|
3
|
+
def self.pick()
|
4
|
+
n = []
|
5
5
|
i = 0
|
6
|
-
if
|
7
|
-
while i <
|
8
|
-
pick = rand(1..
|
9
|
-
unless
|
10
|
-
|
6
|
+
if 7 <= 50
|
7
|
+
while i < 7
|
8
|
+
pick = rand(1..50)
|
9
|
+
unless n.include?(pick)
|
10
|
+
n << pick
|
11
11
|
i += 1
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
-
puts "
|
15
|
+
puts "#{n[0]}, #{n[1]}, #{n[2]}, #{n[3]}, #{n[4]}, #{n[5]}, [#{n[6]}]"
|
16
16
|
end
|
17
|
+
self.pick
|
17
18
|
end
|
18
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_game_randomizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Mckinney
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Write a longer description or delete this line.
|
14
14
|
email:
|