>
> ? I don't understand. What I suggesed was to check if the
> last ply before the variations is the same ply as within.
> "if so, do not display the first ply of the var but the
> second one". However, I do not know if this is at all easy
> to do. It would be something like showing two plys of
> variation arrows.
>
> --
Ops, my bad.
The problem is that you show moves for the wrong side.
In your example after 1. e4 it's black turn, but you show moves for white.
I don't really like that, but i attached a patch so you can try it.
Bye,
Fulvio
Index: tcl/move.tcl
===================================================================
RCS file: /cvsroot/scid/scid/tcl/move.tcl,v
retrieving revision 1.3
diff -u -r1.3 move.tcl
--- tcl/move.tcl 27 Oct 2009 22:20:30 -0000 1.3
+++ tcl/move.tcl 30 Nov 2009 20:09:45 -0000
@@ -46,18 +46,28 @@
}
proc ::move::showVarArrows {} {
- set move [sc_game info nextMoveUCI]
- if {$move != ""} {
- set sq_start [ ::board::sq [ string range $move 0 1 ] ]
- set sq_end [ ::board::sq [ string range $move 2 3 ] ]
- ::board::mark::add ".main.board" "arrow" $sq_start $sq_end "green"
- }
- set varList [sc_var list UCI]
+ set main_move [sc_game info nextMoveUCI]
+ set varList [sc_var list UCI]
+ set i 0
foreach { move } $varList {
- set sq_start [ ::board::sq [ string range $move 0 1 ] ]
- set sq_end [ ::board::sq [ string range $move 2 3 ] ]
- ::board::mark::add ".main.board" "arrow" $sq_start $sq_end "blue"
+ if {$move == $main_move} {
+ sc_var moveInto $i
+ set move [sc_game info nextMoveUCI]
+ sc_var exit
+ }
+ if {$move != ""} {
+ set sq_start [ ::board::sq [ string range $move 0 1 ] ]
+ set sq_end [ ::board::sq [ string range $move 2 3 ] ]
+ ::board::mark::add ".main.board" "arrow" $sq_start $sq_end "blue"
+ }
+ incr i
}
+ if {$main_move != ""} {
+ set sq_start [ ::board::sq [ string range $main_move 0 1 ] ]
+ set sq_end [ ::board::sq [ string range $main_move 2 3 ] ]
+ ::board::mark::add ".main.board" "arrow" $sq_start $sq_end "green"
+ }
+
}
proc ::move::Start {} {
@@ -89,7 +99,7 @@
proc ::move::Back {{count 1}} {
if {$::tree(refresh)} { return }
- if {[sc_pos isAt vstart]} { ::move::ExitVar; return }
+ if {[sc_pos isAt vstart]} { ::move::ExitVar; return }
### todo: if playing, remove this move from hash array S.A ??
@@ -110,6 +120,7 @@
}
if {[::move::drawVarArrows]} { ::move::showVarArrows }
+ if {[sc_pos isAt vstart]} { ::move::Back }
}
proc ::move::Forward {{count 1}} {
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Scid-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scid-users