ImpUnit 0.2.9 → 0.3.3
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 +4 -4
 - data/lib/ImpUnit/version.rb +1 -1
 - data/lib/ImpUnit.rb +29 -19
 - 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
    
    | 
         @@ -549,12 +549,14 @@ end" 
     | 
|
| 
       549 
549 
     | 
    
         | 
| 
       550 
550 
     | 
    
         
             
                    puts "Form status: Changing form..."
         
     | 
| 
       551 
551 
     | 
    
         | 
| 
       552 
     | 
    
         
            -
                    new_value =  
     | 
| 
      
 552 
     | 
    
         
            +
                    new_value = bot_choice + 1
         
     | 
| 
       553 
553 
     | 
    
         | 
| 
       554 
554 
     | 
    
         
             
                    open("data/bot_input/input.txt", "w") { |f|
         
     | 
| 
       555 
555 
     | 
    
         
             
                      f.puts new_value
         
     | 
| 
       556 
556 
     | 
    
         
             
                    }
         
     | 
| 
       557 
557 
     | 
    
         | 
| 
      
 558 
     | 
    
         
            +
                    sleep(0.5)
         
     | 
| 
      
 559 
     | 
    
         
            +
             
     | 
| 
       558 
560 
     | 
    
         
             
                    ImpUnit::BotWings.reshape
         
     | 
| 
       559 
561 
     | 
    
         
             
                  end
         
     | 
| 
       560 
562 
     | 
    
         | 
| 
         @@ -674,30 +676,38 @@ end" 
     | 
|
| 
       674 
676 
     | 
    
         
             
              end
         
     | 
| 
       675 
677 
     | 
    
         
             
            end
         
     | 
| 
       676 
678 
     | 
    
         | 
| 
       677 
     | 
    
         
            -
             
     | 
| 
       678 
     | 
    
         
            -
               
     | 
| 
       679 
     | 
    
         
            -
                 
     | 
| 
       680 
     | 
    
         
            -
             
     | 
| 
      
 679 
     | 
    
         
            +
            module Bianca
         
     | 
| 
      
 680 
     | 
    
         
            +
              class SmallTalk
         
     | 
| 
      
 681 
     | 
    
         
            +
                def self.discuss
         
     | 
| 
      
 682 
     | 
    
         
            +
                  require "programr"
         
     | 
| 
       681 
683 
     | 
    
         | 
| 
       682 
     | 
    
         
            -
             
     | 
| 
       683 
     | 
    
         
            -
             
     | 
| 
      
 684 
     | 
    
         
            +
                  bot_name = File.read("data/bot_identity/name.txt").strip
         
     | 
| 
      
 685 
     | 
    
         
            +
                  usr_name = File.read("data/usr_identity/name.txt").strip
         
     | 
| 
       684 
686 
     | 
    
         | 
| 
       685 
     | 
    
         
            -
             
     | 
| 
       686 
     | 
    
         
            -
                #end
         
     | 
| 
      
 687 
     | 
    
         
            +
                  brains = Dir.glob("brain/*")
         
     | 
| 
       687 
688 
     | 
    
         | 
| 
       688 
     | 
    
         
            -
             
     | 
| 
       689 
     | 
    
         
            -
             
     | 
| 
      
 689 
     | 
    
         
            +
                  robot = ProgramR::Facade.new
         
     | 
| 
      
 690 
     | 
    
         
            +
                  robot.learn(brains)
         
     | 
| 
       690 
691 
     | 
    
         | 
| 
       691 
     | 
    
         
            -
             
     | 
| 
       692 
     | 
    
         
            -
                #end
         
     | 
| 
      
 692 
     | 
    
         
            +
                  puts " Welcome to #{bot_name}. This is the terminal for Bianca."
         
     | 
| 
       693 
693 
     | 
    
         | 
| 
       694 
     | 
    
         
            -
             
     | 
| 
       695 
     | 
    
         
            -
             
     | 
| 
      
 694 
     | 
    
         
            +
                  while true
         
     | 
| 
      
 695 
     | 
    
         
            +
                    print "#{usr_name } >> "
         
     | 
| 
      
 696 
     | 
    
         
            +
                    s = STDIN.gets.chomp
         
     | 
| 
       696 
697 
     | 
    
         | 
| 
       697 
     | 
    
         
            -
             
     | 
| 
       698 
     | 
    
         
            -
             
     | 
| 
       699 
     | 
    
         
            -
             
     | 
| 
       700 
     | 
    
         
            -
            # 
     | 
| 
      
 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
         
     | 
| 
       701 
711 
     | 
    
         | 
| 
       702 
712 
     | 
    
         
             
            ## Measuring the distance between objects and size of objects in space.
         
     | 
| 
       703 
713 
     | 
    
         
             
            #module SpatialRelationships
         
     |