ImpUnit 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ImpUnit/version.rb +1 -1
- data/lib/ImpUnit.rb +26 -18
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ee804d5e128a2beca2ddcd5900c2df26d1e9d8ad02b7fc2e20d8572ea046471
|
4
|
+
data.tar.gz: 4bc2eaef1d73f526cb6a904fda0a65afc225da7a18ef41f946d1dd95e5793b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bc97dd0b99af7ef6022465c7f115ea7e3ed0a8394342ee38cbad70f2a6d119ee0f5fc0b66affdae74867f1da601c4ee84efff7adde1b0183076221b4f182e6b
|
7
|
+
data.tar.gz: 96824776c678112e1df0808d00cb16cff440a6b07580dc31f9ef0dd2c9796ae2598ab458a68cd28da757a91e0b0632d4836558dd7fd41464df64e9babef4bb8a
|
data/lib/ImpUnit/version.rb
CHANGED
data/lib/ImpUnit.rb
CHANGED
@@ -676,30 +676,38 @@ end"
|
|
676
676
|
end
|
677
677
|
end
|
678
678
|
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
679
|
+
module Bianca
|
680
|
+
class SmallTalk
|
681
|
+
def self.discuss
|
682
|
+
require "programr"
|
683
683
|
|
684
|
-
|
685
|
-
|
684
|
+
bot_name = File.read("data/bot_identity/name.txt").strip
|
685
|
+
usr_name = File.read("data/usr_identity/name.txt").strip
|
686
686
|
|
687
|
-
|
688
|
-
#end
|
687
|
+
brains = Dir.glob("brain/*")
|
689
688
|
|
690
|
-
|
691
|
-
|
689
|
+
robot = ProgramR::Facade.new
|
690
|
+
robot.learn(brains)
|
692
691
|
|
693
|
-
|
694
|
-
#end
|
692
|
+
puts " Welcome to #{bot_name}. This is the terminal for Bianca."
|
695
693
|
|
696
|
-
|
697
|
-
|
694
|
+
while true
|
695
|
+
print "#{usr_name } >> "
|
696
|
+
s = STDIN.gets.chomp
|
698
697
|
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
#
|
698
|
+
reaction = robot.get_reaction(s)
|
699
|
+
|
700
|
+
if reaction == ""
|
701
|
+
STDOUT.puts "#{bot_name} << I have no idea."
|
702
|
+
elsif reaction == "Closing"
|
703
|
+
abort
|
704
|
+
else
|
705
|
+
STDOUT.puts "#{bot_name} << #{reaction}"
|
706
|
+
end
|
707
|
+
end
|
708
|
+
end
|
709
|
+
end
|
710
|
+
end
|
703
711
|
|
704
712
|
## Measuring the distance between objects and size of objects in space.
|
705
713
|
#module SpatialRelationships
|