rules_ai 0.6.0 → 0.8.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7878a0a5df36a236fe35cb77739cbaf25185e5a2f90a7a8af8ebebb7704973a7
4
- data.tar.gz: cf736128214579c84d5c1634daa51d66a936fff11c6ab8b30c8c840155223b56
3
+ metadata.gz: 917312bdc11c8d360345f504f6a160d8c21d80b56b3c5ac06be35026e5d1f63c
4
+ data.tar.gz: 773c7dcc9056709b30d5e8a5cf4ab395c63846cbd88bb4ea310c420a6805c575
5
5
  SHA512:
6
- metadata.gz: c6f3154a21c7b00d49d5c7edb602432a25a2bf299e2463a168db94090bbd5d3df3d4162f16be5f93e37642b9dbbfce5a07c18c53908a0ae84824d428770ef7d9
7
- data.tar.gz: 8d34985463cf666370043019e7d7de20d01155627cf8f4debf3e28203834a997192f3db02c5015a944d74826155b173119921a99611a8673e80f517e3925b670
6
+ metadata.gz: 10a75fa6ac8e510d1a6d3f4f523db82fe7693080ae756314256dbae347eb09b3d121ba324826ef3b624c8c7f01649bb666e786843f8fb18fb7a6bf95272b7f05
7
+ data.tar.gz: 613f23e64aa1c446e5ad21676f56e62e1ba9c3ae3bab3edf27b16b30bb5c1a442ea909b475b588b7dc93b94fda85cf7cb19925065bf7e403bfd002fd84252137
@@ -6,8 +6,13 @@ module RulesAi
6
6
  # Your code goes here...
7
7
  class Rules_Set
8
8
  def self.hours_passed
9
- starting_time = 2%12
10
- ending_time = 3%12
9
+ bot_name = File.read("data/bot_identity/name.txt").strip
10
+
11
+ print "What is your starting time? >> "
12
+ starting_time = gets.chomp.strip.to_i # % 12
13
+
14
+ print "What is your ending time? >> "
15
+ ending_time = gets.chomp.strip.to_i # %12
11
16
 
12
17
  print "What is your working interval? >> "
13
18
  time_interval = gets.chomp.to_i
@@ -15,7 +20,7 @@ module RulesAi
15
20
  hours_added_start = starting_time + time_interval
16
21
  hours_added_end = ending_time + time_interval
17
22
 
18
- puts "If starting time was #{starting_time}:00 and ending time was #{ending_time}:00, new time alottments is #{hours_added_start}:00 and #{hours_added_end}:00."
23
+ puts "#{bot_name}: If starting time was #{starting_time}:00 and ending time was #{ending_time}:00,\nthe new time alottments are #{hours_added_start}:00 and #{hours_added_end}:00."
19
24
  end
20
25
 
21
26
  def self.tesla_multiplication
@@ -103,7 +108,8 @@ module RulesAi
103
108
  coping = File.read("syllables/coping.txt").strip
104
109
  devilgoodcompany = File.read("syllables/devilgoodcompany.txt").strip
105
110
  dianacyberneticdreams = File.read("syllables/dianacyberneticdreams.txt").strip
106
- dontfallback = File.read("syllables/droptheidealogies.txt").strip
111
+ dontfallback = File.read("syllables/dontfallback.txt").strip
112
+ droptheidealogies = File.read("syllables/droptheideologies.txt").strip
107
113
  flalaikurose = File.read("syllables/flalaikurose.txt").strip
108
114
  girlnothingbutadream = File.read("syllables/goodopticsinthetropics.txt").strip
109
115
  haywiremeltingdown = File.read("syllables/haywiremeltingdown.txt").strip
@@ -137,73 +143,88 @@ module RulesAi
137
143
  windmillsong = File.read("syllables/windmillsong.txt").strip
138
144
 
139
145
  ## Assign Each Poem To Large String
140
- super_poem = "
141
- #{allistodust}
142
- #{alongforestgreen}
143
- #{anarchojean}
144
- #{atmydoor}
145
- #{badinbed}
146
- #{beingmyself}
147
- #{coping}
148
- #{devilgoodcompany}
149
- #{dianacyberneticdreams}
150
- #{dontfallback}
151
- #{flalaikurose}
152
- #{girlnothingbutadream}
153
- #{haywiremeltingdown}
154
- #{inthislandoftennessee}
155
- #{invisibleminorities}
156
- #{juicyneonsteak}
157
- #{lackofcommunication}
158
- #{laimencoformoonlight}
159
- #{leadwithfeelingnotthemind}
160
- #{littleants}
161
- #{lonelypetalswither}
162
- #{marrowlust}
163
- #{mmesmiled}
164
- #{momentarysilence}
165
- #{neveradrollmoment}
166
- #{newlaconia}
167
- #{nightlystatues}
168
- #{sentimentality}
169
- #{shadowonthewall}
170
- #{shotgungirl}
171
- #{skeletonsfinallaugh}
172
- #{sliceoflife}
173
- #{spidersandtheghost}
174
- #{superyacht}
175
- #{thegirlwiththerosecheeks}
176
- #{turntodust}
177
- #{undertheweepingwillowtree}
178
- #{unravelingfriendship}
179
- #{waitinginthewall}
180
- #{whattheysayofrome}
181
- #{windmillsong}
182
- ".split(" ").shuffle
183
-
184
- possible_lines = [1, 2, 3, 4, 5, 6, 7, 8].shuffle
146
+ super_poem = [
147
+ allistodust,
148
+ alongforestgreen,
149
+ anarchojean,
150
+ atmydoor,
151
+ badinbed,
152
+ beingmyself,
153
+ coping,
154
+ devilgoodcompany,
155
+ dianacyberneticdreams,
156
+ dontfallback,
157
+ droptheidealogies,
158
+ flalaikurose,
159
+ girlnothingbutadream,
160
+ haywiremeltingdown,
161
+ inthislandoftennessee,
162
+ invisibleminorities,
163
+ juicyneonsteak,
164
+ lackofcommunication,
165
+ laimencoformoonlight,
166
+ leadwithfeelingnotthemind,
167
+ littleants,
168
+ lonelypetalswither,
169
+ marrowlust,
170
+ mmesmiled,
171
+ momentarysilence,
172
+ neveradrollmoment,
173
+ newlaconia,
174
+ nightlystatues,
175
+ sentimentality,
176
+ shadowonthewall,
177
+ shotgungirl,
178
+ skeletonsfinallaugh,
179
+ sliceoflife,
180
+ spidersandtheghost,
181
+ superyacht,
182
+ thegirlwiththerosecheeks,
183
+ turntodust,
184
+ undertheweepingwillowtree,
185
+ unravelingfriendship,
186
+ waitinginthewall,
187
+ whattheysayofrome,
188
+ windmillsong,
189
+ ]
190
+
191
+ ran_1 = rand(8) % 12
192
+ ran_2 = rand(8) % 12
193
+ ran_3 = rand(8) % 12
194
+ ran_4 = rand(8) % 12
195
+ ran_5 = rand(8) % 12
196
+ ran_6 = rand(8) % 12
197
+ ran_7 = rand(8) % 12
198
+ ran_8 = rand(8) % 12
199
+
200
+ poem_1 = super_poem[ran_1].split(",")
201
+ poem_2 = super_poem[ran_2].split(",")
202
+ poem_3 = super_poem[ran_3].split(",")
203
+ poem_4 = super_poem[ran_4].split(",")
204
+ poem_5 = super_poem[ran_5].split(",")
205
+ poem_6 = super_poem[ran_6].split(",")
206
+ poem_7 = super_poem[ran_7].split(",")
207
+ poem_8 = super_poem[ran_8].split(",")
185
208
 
186
209
  ## Output New Poem From Shuffled String
187
- line_1 = super_poem[possible_lines[0]]
188
- line_2 = super_poem[possible_lines[1]]
189
- line_3 = super_poem[possible_lines[2]]
190
- line_4 = super_poem[possible_lines[3]]
191
- line_5 = super_poem[possible_lines[4]]
192
- line_6 = super_poem[possible_lines[5]]
193
- line_7 = super_poem[possible_lines[6]]
194
- line_8 = super_poem[possible_lines[7]]
210
+ line_1 = poem_1[0]
211
+ line_2 = poem_2[1]
212
+ line_3 = poem_3[2]
213
+ line_4 = poem_4[3]
214
+ line_5 = poem_5[4]
215
+ line_6 = poem_6[5]
216
+ line_7 = poem_7[6]
217
+ line_8 = poem_8[7]
195
218
 
196
219
  open("output/poetry/poem.txt", "w") { |f|
197
- f.puts "
198
- #{line_1}
199
- #{line_2}
200
- #{line_3}
201
- #{line_4}
202
- #{line_5}
203
- #{line_6}
204
- #{line_7}
205
- #{line_8}
206
- "
220
+ f.puts line_1# .strip
221
+ f.puts line_2# .strip
222
+ f.puts line_3# .strip
223
+ f.puts line_4# .strip
224
+ f.puts line_5# .strip
225
+ f.puts line_6# .strip
226
+ f.puts line_7# .strip
227
+ f.puts line_8# .strip
207
228
  }
208
229
  end
209
230
 
@@ -1,3 +1,3 @@
1
1
  module RulesAi
2
- VERSION = "0.6.0"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rules_ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gitea
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-11 00:00:00.000000000 Z
11
+ date: 2020-11-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a collection of different rules based functions, from calculating
14
14
  how many hours have passed, tesla multiplication, autonomous prompting ( such as