## $Id$
## Copyright (C) 2004 NABEYA Kenichi (aka nanami@2ch)
-## Copyright (C) 2007-2008 Daigo Moriwaki (daigo at debian dot org)
+## Copyright (C) 2007-2012 Daigo Moriwaki (daigo at debian dot org)
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
# 2. a rival player instance found
# 3. nil if rival not found
#
- def find_rival(player, my_sente_string, game_name)
- case my_sente_string
- when "*" # no preference
+ def find_rival(player, game_name)
+ case player.sente
+ when nil # no preference
if Login.handicapped_game_name?(game_name)
player.write_safe("##[ERROR] Random turn preference is not allowed for handicapped games\n")
return :continue
end
return get_player("game_waiting", game_name, nil, player)
- when "+" # rival must be gote
+ when true # rival must be gote
return get_player("game_waiting", game_name, false, player)
- when "-" # rival must be sente
+ when false # rival must be sente
return get_player("game_waiting", game_name, true, player)
else
write_safe("##[ERROR] bad game option: %s\n" % [my_sente_string])