OSDN Git Service

Fixed case... when... syntax for Ruby 1.9.3.
[shogi-server/shogi-server.git] / shogi_server / player.rb
index 3a86c96..fa43182 100644 (file)
@@ -115,6 +115,16 @@ class BasicPlayer
       @player_id = @password = nil
     end
   end
+
+  def set_sente_from_str(str)
+    case str
+    when "+" then @sente = true
+    when "-" then @sente = false
+    else
+      # str should be "*"
+      @sente = nil
+    end
+  end
 end