From 378449625a2327ac41545cd97add8526969d4647 Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Thu, 25 Jun 2009 14:33:50 +0200
Subject: [PATCH] Take result of ICS games into account when saving.
---
lib/games/chess/pgn.rb | 2 ++
lib/interaction/match.rb | 1 +
2 files changed, 3 insertions(+)
diff --git a/lib/games/chess/pgn.rb b/lib/games/chess/pgn.rb
index 33aa61b..3071a5c 100644
--- a/lib/games/chess/pgn.rb
+++ b/lib/games/chess/pgn.rb
@@ -32,6 +32,8 @@ class PGN
def result(value)
case value
+ when String
+ value
when :white
"1-0"
when :black
diff --git a/lib/interaction/match.rb b/lib/interaction/match.rb
index a5530ca..44672f1 100644
--- a/lib/interaction/match.rb
+++ b/lib/interaction/match.rb
@@ -108,6 +108,7 @@ class Match
end
def close(result, message)
+ @info[:result] = result
broadcast nil, :close => {
:result => result,
:message => message }
--
2.11.4.GIT