Friday, March 13, 2015

Registered Diagrams

Why Register a Diagram?

The only reason for registering a diagram is for move playback. This is especially useful in a chess diary or a book of combinations or endings.

Registering a Diagram

Before you can begin to play any moves on a diagram you must first register the diagram to be used. To do so, you place the cursor inside the diagram you wish to use, and then click on the Diagram Registration icon:
 

Once OoChess is satisfied that you have indeed placed the cursor inside a valid diagram, it then saves the current position of the diagram so that it can be restored when you have finished playing moves on it. If all goes well, the next thing that you should see is a dialog that will allow you to set some status information about the position in the diagram:



This dialog allows you to set up the game state according to that of the diagrammed position. For example, if the diagram is flipped, Black at the bottom, White on top, then you would check the first option, This is a Flipped Diagram. If you wanted to start to play out the moves on the diagram starting from the initial position -- the actual starting position of every chess game -- then you would check the second option, Set Diagram to Initial Position. To Move is obvious. You can also tell the move parser whether there is an En Passant capture possible in the position on the next move. You would just select the file that the En Passant pawn is on, that is the pawn that can be captured on the next move.

Once you have set the dialog options to whatever you wish, and have clicked on the OK button, the diagram will then be registered for move playback. If there were no errors in the registration, then the Diagram Registration icon will change its appearance to look like this:



This indicates that the diagram has been successfully registered. When a diagram is currently registered, no other diagram can be created in your document until you un- register it. You do this by simply clicking on the Diagram Registration icon again. It will then restore the diagram to its original position, and you will be free to make more diagrams as you wish.

Once you have registered a diagram, the next step is to select the moves you wish to play on it. You do this by selecting the text of the moves, then clicking on the Play Moves icon:



OoChess will then play these moves out on the internal board. As it does so, it will create an internal structure that contains all the data required to play those same moves on the registered diagram. Once this processing is completed – it is quite fast – you can then play those moves out on the diagram by clicking on any of the playback navigation icons on the Chess Replay toolbar:




The icons, from left to right are: Diagram Registration, Start, Back, Forward, Play Variations, End and Flip. All the icons, apart from Diagram Registration, allow you to navigate through the moves to be played on the registered diagram. Their use is obvious and so no further details are required.

A Simple Example of Move Playback


Let's look at a simple example of playing back moves in a diagram. Suppose you've made this entry in your chess diary:

July 24:

An Amazing Zugzwang Example:

 

(W)

White wins by: 1. Be5 Bxe5 2. Rxe5+ Kf8 and now the amazing move of 3. Re8+!! Kxe8 4. g7 Rg8 5. f6! Now Black is in zugzwang. 5... Rf8 6. gxf8=Q+ Kxf8 7. Kd7 Kg8 8. Ke8 Kh7 9. Kxf7 and White wins.

 To be able to play out all the moves under the diagram, you first select all of the text containing the moves, “White wins by: 1. Be5 … 9. Kxf7 and White wins.” and then click on the Play Moves icon.

You can now play back those moves by clicking on the Forward button in the Chess Replay Toolbar. (You can also use any of the other navigation buttons as well, including the Flip button.)

When you are finished playing out the moves, all you have to do is click on the Diagram Registration icon again and it will restore the diagram to its original position. The button will then turn gray in the center and a message will indicate that the diagram has been restored to its original position.

Also note that you can double click on any of the selected moves under the diagram to go directly to that position.

While the moves are being played on the diagram, the text of the move is also highlighted.

Playing Variations on a Registered Diagram

The playback of moves in a registered diagram can include simple variations. Such variations are enclosed in ( … ) or [ … ] brackets as shown in the example below.


 Reiner - Steinitz, Vienna 1860 (B)

1... Qh4! 2 Rg2 (2 Rxh4?? Rg1#) 2... Qxh2+ 3 Rxh2 Rg1#

If we registered this diagram – don't forget that Black moves first! – and then selected all the moves for replay we could step through the moves with the Forward icon. But the template will play the move sequence: 1... Qh4! 2 Rg2 Qxh2+ 3 Rxh2 Rg1#. What we learn from this is that the Forward icon always skips over any variations.

To step into and play the variation moves, you would use the red arrow icon called Play Variations.


This time all the moves get played, including those in the variation, namely 2 Rxh4?? Rg1#.

Naturally, you can also double click on any move to go directly to that position. This applies for variation moves as well.

Multiple Selections of Moves for Playback

You can make multiple selections of moves to be played back. Each new selection of moves is simply appended to the previously selected moves that were prepared for playback.

Consider this example:

Potemkin - Alekhine
St Petersburg, 1912
1.e4 c5 2.g3 g6 3.Bg2 Bg7 4.Ne2 Nc6 5.c3 Nf6 6.Na3 d5 7.exd5 Nxd5 8.Nc2 O-O 9.d4 cxd4 10.cxd4 Bg4 11.f3 Bf5 12.Ne3 Qa5+ 13.Kf2 Ndb4 14.Nxf5 Qxf5 15.g4 Nd3+ 16.Kg3

16... Nxd4 17.gxf5 Nxf5+ 0-1
Let's assume that you've already registered this diagram and that you chose to set it to the initial position in the Register Diagram Dialog. You can now select all of the moves above the diagram and click on the Play Moves icon to have them prepared from playback. Now just do the same thing again with the moves under the diagram. That is, select them all and then click on the Play Moves icon.

This ability to make multiple selections of moves for playback is the best option for dealing with difficult sections of text. If you think that some text may be problematic, simply select around it to eliminate the problem.

NOTE: One drawback to using multiple selections for play back is that the template will cancel the highlighting of the moves. As regrettable as this is, it is required. Unfortunately, the code required to enable the highlighting of the moves in multiple selections would be too onerous, so it was dropped in favor of having quicker functionality. For most examples thsi should not prove to be too much of a problem.


No comments:

Post a Comment