- if (@next_player.status != "game") # rival is logout or disconnected
- abnormal_win()
- elsif (status == :timeout)
- timeout_lose()
- elsif (move_status == :illegal)
- illegal_lose()
- elsif (move_status == :kachi_win)
- kachi_win()
- elsif (move_status == :kachi_lose)
- kachi_lose()
- elsif (move_status == :toryo)
- toryo_lose()
- elsif (move_status == :outori)
- outori_win()
- elsif (move_status == :oute_sennichite_sente_lose)
- oute_sennichite_win_lose(@gote, @sente) # Sente is checking
- elsif (move_status == :oute_sennichite_gote_lose)
- oute_sennichite_win_lose(@sente, @gote) # Gote is checking
- elsif (move_status == :sennichite)
- sennichite_draw()
- elsif (move_status == :uchifuzume)
- uchifuzume_lose()
- elsif (move_status == :oute_kaihimore)
- oute_kaihimore_lose()
- else
- finish_flag = false
- end
- finish() if finish_flag
- (@current_player, @next_player) = [@next_player, @current_player]
- @start_time = Time::new
- return finish_flag
+ if (@next_player.status != "game") # rival is logout or disconnected
+ abnormal_win()
+ elsif (status == :timeout)
+ timeout_lose()
+ elsif (move_status == :illegal)
+ illegal_lose()
+ elsif (move_status == :kachi_win)
+ kachi_win()
+ elsif (move_status == :kachi_lose)
+ kachi_lose()
+ elsif (move_status == :toryo)
+ toryo_lose()
+ elsif (move_status == :outori)
+ outori_win()
+ elsif (move_status == :oute_sennichite_sente_lose)
+ oute_sennichite_win_lose(@gote, @sente) # Sente is checking
+ elsif (move_status == :oute_sennichite_gote_lose)
+ oute_sennichite_win_lose(@sente, @gote) # Gote is checking
+ elsif (move_status == :sennichite)
+ sennichite_draw()
+ elsif (move_status == :uchifuzume)
+ uchifuzume_lose()
+ elsif (move_status == :oute_kaihimore)
+ oute_kaihimore_lose()
+ else
+ finish_flag = false