OSDN Git Service

Corrected namespace of GSL::Vector. This line is not reached, though.
[shogi-server/shogi-server.git] / shogi_server / board.rb
index ca12959..d2b304b 100644 (file)
@@ -675,6 +675,8 @@ EOF
     return :normal
   end
 
+  # Return a CSA-styled string notation of the current position.
+  #
   def to_s
     a = Array::new
     y = 1
@@ -711,6 +713,14 @@ EOF
     a.push("%s\n" % [@teban ? "+" : "-"])
     return a.join
   end
+
+  # Return a CSA-styled string notation of the initial position.
+  #
+  def initial_string
+    tmp_board = self.class.new
+    tmp_board.initial
+    return tmp_board.to_s
+  end
 end
 
 end # ShogiServer