From 604d90a5a78892daa92f10b0ee3308cd662d3d91 Mon Sep 17 00:00:00 2001 From: beatles Date: Sun, 30 Jul 2006 13:42:49 +0000 Subject: [PATCH] Add @move_count in Board class, which is used by Shogi Viewer CGI. --- changelog | 5 +++++ shogi-server | 3 +++ 2 files changed, 8 insertions(+) diff --git a/changelog b/changelog index 3d9eb31..b9cc8ab 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,8 @@ +2006-07-30 Daigo Moriwaki + + * Add a @move_counter in Board class, which is used by Shogi Viewer + CGI. + 2006-04-28 Daigo Moriwaki * Jishogi kachi declaration did not work. This bug has been fixed. diff --git a/shogi-server b/shogi-server index d2b1251..0241938 100755 --- a/shogi-server +++ b/shogi-server @@ -791,8 +791,10 @@ class Board @sente_history = Hash::new @gote_history = Hash::new @array = [[], [], [], [], [], [], [], [], [], []] + @move_count = 0 end attr_accessor :array, :sente_hands, :gote_hands, :history, :sente_history, :gote_history + attr_reader :move_count def initial PieceKY::new(self, 1, 1, false) @@ -873,6 +875,7 @@ class Board end @array[x0][y0].move_to(x1, y1) end + @move_count += 1 return true end -- 2.11.0