<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -190,5 +190,33 @@ describe RubyProlog do
     
   end
   
+  
+  it 'should solve the Towers of Hanoi problem.' do
+    c = RubyProlog::Core.new
+    c.instance_eval do
+
+      move[0,:X,:Y,:Z] &lt;&lt;= :CUT   # There are no more moves left
+      move[:N,:A,:B,:C] &lt;&lt;= [
+        is(:M,:N){|n| n - 1}, # reads as &quot;M IS N - 1&quot;
+        move[:M,:A,:C,:B],
+        # write_info[:A,:B],
+        move[:M,:C,:B,:A]
+      ]
+      write_info[:X,:Y] &lt;&lt;= [
+        # write[&quot;move a disc from the &quot;],
+        # write[:X], write[&quot; pole to the &quot;],
+        # write[:Y], writenl[&quot; pole &quot;]
+      ]
+
+       hanoi[:N] &lt;&lt;=  move[:N,&quot;left&quot;,&quot;right&quot;,&quot;center&quot;]
+       query(hanoi[5]).length.should == 1
+
+       # do_stuff[:STUFF].calls{|env| print env[:STUFF]; true}
+
+    end  
+    
+  end
+  
+  
 
 end</diff>
      <filename>spec/ruby-prolog_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b102f80868a1664b0f02755e1c553af4e1f55459</id>
    </parent>
  </parents>
  <author>
    <name>Preston Lee</name>
    <email>preston.lee@openrain.com</email>
  </author>
  <url>http://github.com/preston/ruby-prolog/commit/139398ec4ee499be9b4510c4731b95e1deb4038a</url>
  <id>139398ec4ee499be9b4510c4731b95e1deb4038a</id>
  <committed-date>2009-02-09T15:13:01-08:00</committed-date>
  <authored-date>2009-02-09T15:13:01-08:00</authored-date>
  <message>fixing bug in &quot;is&quot; handling</message>
  <tree>cc8465fffb00a58fc742c06d161510e19d125434</tree>
  <committer>
    <name>Preston Lee</name>
    <email>preston.lee@openrain.com</email>
  </committer>
</commit>
