From 1a0b2acaed638bc2febb1fd704036c5c71b8b90f Mon Sep 17 00:00:00 2001
From: Paolo Capriotti
Date: Sat, 10 Jul 2010 09:51:27 +0100
Subject: [PATCH] Highlight last move when starting observation.
---
lib/interaction/history.rb | 5 +++++
lib/plugins/ics/lib/match_helper.rb | 2 ++
2 files changed, 7 insertions(+)
diff --git a/lib/interaction/history.rb b/lib/interaction/history.rb
index c560eb0..3da6ab2 100644
--- a/lib/interaction/history.rb
+++ b/lib/interaction/history.rb
@@ -93,6 +93,11 @@ class History
fire :force_update
end
+ def move=(value)
+ @history[current].move = value
+ fire :force_update
+ end
+
def text=(value)
@history[current].text = value
fire :force_update
diff --git a/lib/plugins/ics/lib/match_helper.rb b/lib/plugins/ics/lib/match_helper.rb
index 0a20e55..a6b2366 100644
--- a/lib/plugins/ics/lib/match_helper.rb
+++ b/lib/plugins/ics/lib/match_helper.rb
@@ -145,6 +145,8 @@ module MatchHelper
match.history.state = style12.state
end
unless match.history.move
+ move = match_info[:icsapi].parse_last_move(style12.last_move, style12.state.turn)
+ match.history.move = move
match.history.text = style12.last_move_san
end
match.update_time(style12.time)
--
2.11.4.GIT