xboard.git
8 years agoFix disappearance of a1 on double capture
H.G.Muller [Fri, 24 Jul 2015 21:47:39 +0000]
Fix disappearance of a1 on double capture

The triple-capture patch did indicate a1 as initial second e.p. victim.

8 years agoUpdated copyright notice to 2015
Arun Persaud [Sun, 17 May 2015 06:35:46 +0000]
Updated copyright notice to 2015

9 years agomake install from macports part 2
Joshua Pettus [Tue, 28 Apr 2015 15:15:22 +0000]
make install from macports part 2

Oops, forgot a line..

9 years agoMake install from macports more robust
Joshua Pettus [Tue, 28 Apr 2015 14:05:53 +0000]
Make install from macports more robust

better to search for the macports prefix then assume /opt/local

9 years agoChange Copyright year in info.plist.in
Joshua Pettus [Tue, 24 Mar 2015 20:52:22 +0000]
Change Copyright year in info.plist.in

9 years agorenaming fics logo
Joshua Pettus [Wed, 11 Mar 2015 21:42:49 +0000]
renaming fics logo

9 years agoLogo Updates
Joshua Pettus [Wed, 11 Mar 2015 21:38:12 +0000]
Logo Updates

9 years agomoving part2
Joshua Pettus [Wed, 11 Mar 2015 21:04:15 +0000]
moving part2

9 years agoA little reorganizing
Joshua Pettus [Wed, 11 Mar 2015 20:40:52 +0000]
A little reorganizing

9 years agoRemove unused directory
Joshua Pettus [Tue, 10 Mar 2015 20:02:05 +0000]
Remove unused directory

9 years agoGTK OSX theme reimplemented
Joshua Pettus [Tue, 10 Mar 2015 19:33:05 +0000]
GTK OSX theme reimplemented

This is a new theme that was included with the GIMP OSX app.  It is
much simpler with no pixbuffs, so there should be no chance of missing
images.  Also had to reimplement the murrine engine.

9 years agogtkmacintegration localization updates
Joshua Pettus [Tue, 10 Mar 2015 19:19:53 +0000]
gtkmacintegration localization updates

With the update to the gtkmacintegration library, localization strings
have been fixed, so there is no need for us to have separate ones, and
we can pull from the macports install.

9 years agogtkmacintegration name change
Joshua Pettus [Tue, 10 Mar 2015 19:16:10 +0000]
gtkmacintegration name change

with the last update the gtkmacintegration lib was renamed
gtkmacintegration-gtk2 to differentiate from gtk3

9 years agoOSX master conf changes
Joshua Pettus [Tue, 10 Mar 2015 19:14:09 +0000]
OSX master conf changes

Make OSX app masterconf more in line with the default one, where it was
unnecessary.  Also it was a mistake to use the ip address for FICS as
they changed it.

9 years agoInclude Pango Modules
Joshua Pettus [Tue, 10 Mar 2015 18:27:20 +0000]
Include Pango Modules

Before I was using a special macports variant that had the pango
modules built into the library.  Now that I know a little bit more,
it’s really not necessary to require a special variant here.

9 years agoMan and Info Page Fix
Joshua Pettus [Tue, 10 Mar 2015 18:21:36 +0000]
Man and Info Page Fix

Terminal.app doesn’t accept command line arguments. Rather then use OSX
feature of using .command scripts to launch the man and info pages
(which is problematic with gatekeeper),  it is much better to open them
directly with applescript.   Had to move infoProc to xboard.c to do
this though.

9 years agoMerge branch 'v4.8.x' into master
Arun Persaud [Fri, 8 May 2015 15:00:11 +0000]
Merge branch 'v4.8.x' into master

9 years agoImplement -positionDir option GTK
H.G.Muller [Sat, 20 Dec 2014 19:47:05 +0000]
Implement -positionDir option GTK

This volatile option determines where Load Position starts browsing.

9 years agoAllow promotion choice in variant asean
H.G.Muller [Mon, 17 Nov 2014 21:51:19 +0000]
Allow promotion choice in variant asean

Apparently the rules of this game are changed since the first draft
from 2011, and now you cannot just promote to Ferz ('Queen'), but pick
any piece. Meaning the Rook has to be the default, being the strongest.

9 years agoFix crash on using Browse buttons in Tournament dialog Xaw
H.G.Muller [Tue, 11 Nov 2014 13:40:43 +0000]
Fix crash on using Browse buttons in Tournament dialog Xaw

The Xaw file browser assumes the text entries it is browsing for are
all in dialogs of the class TransienDlg, but the Tournament Options
dialog has been altered to MasterDlg, to allow it to co-exist with
Time Control and Common-Engine dialog (which can be opened through
buttons in it). Xaw did not like that, and the true DialogClass is
now used when setting the widget text.

9 years agoFix -addMasterOption option
H.G.Muller [Mon, 10 Nov 2014 13:29:25 +0000]
Fix -addMasterOption option

The comparison of the date stamps in master and user settings file
was broken, because the date stamps were declared as unsigned, so that
the difference would never be negative.

9 years agoFix premature disappearence of Lion victims
H.G.Muller [Sun, 2 Nov 2014 14:52:25 +0000]
Fix premature disappearence of Lion victims

The check test did not correctly undo a Lion e.p. capture, which
would make the victim already disappear after entry of the first leg,
which potentially could affect the second leg move generation.
(Not in Lions, though, but in Betza castlings it manifested itself.)

9 years agoConnect OSX Quit menu to ExitEvent
H.G.Muller [Thu, 30 Oct 2014 14:01:59 +0000]
Connect OSX Quit menu to ExitEvent

The Quit menu item provided by OSX was not equivalent to the original
XBoard menu item, as it did not automatically call ExitEvent. (Which
closing the window did.) This meant a hard kill, without saving settings
or the last game, and not properly shutting down the engine(s).
We now catch the OSX 'WillTerminate' event to perform these tasks.

9 years agoAdd USI/UCCI checkbox to Load Engine dialog
H.G.Muller [Tue, 28 Oct 2014 21:37:22 +0000]
Add USI/UCCI checkbox to Load Engine dialog

Assign a default command to the -uxiAdapter when it was not yet defined,
as this will be used after ticking the checkbox, and the compile-time
default for it was an empty string, and will have found its way in
the user settings files of most users (making configuring through
the master settings file pointless).

9 years agoAllow promotion to piece with letter ID in Chu
H.G.Muller [Sat, 18 Apr 2015 09:09:34 +0000]
Allow promotion to piece with letter ID in Chu

Normally all promoted versions in Chu have ID '+', but it could be
useful to allow piece promotion always, as long as the promoted piece
participates.

9 years agoImplement triple capture (not finished)
H.G.Muller [Sat, 18 Apr 2015 09:07:14 +0000]
Implement triple capture (not finished)

9 years agoMake Claws glyph available in non-Chu variants
H.G.Muller [Fri, 13 Mar 2015 21:58:15 +0000]
Make Claws glyph available in non-Chu variants

The variant-dependent replacement glyphs for promotable pieces in Chu
are now assigned to pieces that reuse the replaced glyphs to represent
promoted pieces, rather than to unused promoted pieces. This means that
in Chu they now must be replaced by swapping, which avoids occurrence
of duplicats both in Chu and other variants. And thus frees piece types
that now can be used for new glyphs. As a result the Nightrider remains
available in Chu, and the Claw glyph in other variants. Other freed
pieces are for now used for the promotion Golds of variant shogi.

9 years agoAlso allow Princess SVG piece to be diversify
H.G.Muller [Fri, 13 Mar 2015 20:42:53 +0000]
Also allow Princess SVG piece to be diversify

The image for the Grasshopper has a copy in the Chu-promoted series.
The unpromoted image (not needed in Chu) is now preferentially taken
from a Crown image rather than Princess, allowing distinction between
the promoted and unpromoted piece in kanji themes for Wa Shogi.
Any piece between Grasshopper and chu-promoted Marhall can now in principle
use a backup.

9 years agoAllow Lion double-moves in opening book
H.G.Muller [Wed, 11 Mar 2015 12:44:21 +0000]
Allow Lion double-moves in opening book

Double moves can now be encoded in a Polyglot es promoType = 2, and
a code for two King steps in the to-square. The moves are retrieved
in the Alien Edition protocol format (i.e. comma-separated LAN).
HandleMachineMove had to be adapted to handle the two legs coming as one,
but otherwise the book code can just send the retrieved line directly
to the engine.
 For Edit Book the format has to be converted to TSA-like for display,
to make the move parser that will read it on saving understand the move
as a single one.

9 years agoFix reading of pieceToChar string and piece command
H.G.Muller [Tue, 10 Mar 2015 16:57:08 +0000]
Fix reading of pieceToChar string and piece command

9 years agoFix printing of book moves for double-digit ranks
H.G.Muller [Mon, 9 Mar 2015 21:04:17 +0000]
Fix printing of book moves for double-digit ranks

The book-code move_to_string was not adapted to double digits,
and printed ':' in stead of 10.

9 years agoFix display update during Edit Book
H.G.Muller [Mon, 9 Mar 2015 19:35:45 +0000]
Fix display update during Edit Book

When moves were deleted from the book, this was only shown after
quitting and restarting XBoard, because the stream that was used for
reading the book was a different one as the stream writing it.

9 years agoRemove chu theme file from XBoard install
H.G.Muller [Mon, 9 Mar 2015 19:26:34 +0000]
Remove chu theme file from XBoard install

This file should come with the Chu Shogi piece images, not with XBoard.
In addition the file was obsolete, and used an erroneous option name.

9 years agoFix probing of GUI book for board with more than 10 ranks
H.G.Muller [Sun, 8 Mar 2015 16:46:08 +0000]
Fix probing of GUI book for board with more than 10 ranks

The move-to-text code was not yet adapted to the convention that rank
counting only starts at 0 for boards of exactly 10 ranks.

9 years agoImplement piece suffixes
H.G.Muller [Thu, 5 Mar 2015 14:58:56 +0000]
Implement piece suffixes

The piece ID can now be suffixed with an 'ornament', which then
is considered part of the piece ID. This expands the number of pieces
that can be indicated in FEN or SAN to several times the alphabet.
This does not yet work in a promotion suffix, as it is mainly intended
for the large Shogi variants, which only use + as promotion suffix.
It also does not work on King (which deserves an unadulterated letter).
Currently the ornaments ' (single quote) and ! (exclamation point) are
defined, (through a macro SUFFIXES in moves.h), increasing the number
of piece types that can be represented to 78.

9 years agoFix crash XBoard on changing Game List Tags
H.G.Muller [Wed, 4 Mar 2015 08:09:28 +0000]
Fix crash XBoard on changing Game List Tags

When the Game List was not up, the attempt to immediately update its
contents after changing the game-header format through the Game List Tags
dialog would result in a segfault.

9 years agoFix shift-JIS codes for N, P, +B, +R
H.G.Muller [Wed, 4 Mar 2015 08:08:57 +0000]
Fix shift-JIS codes for N, P, +B, +R

9 years agoChange book Zobrist key for Chu promoted pieces
H.G.Muller [Tue, 3 Mar 2015 21:44:32 +0000]
Change book Zobrist key for Chu promoted pieces

Promoted pieces for Chu (i.e. above Lion, with the exception of King)
now get keys derived from their base type, by XORing in a square-dependent
'promoted' key. This makes it possible to extend the unpromoted series
with new pieces without altering the keys for the promoted pieces.
So that the current book code works upto 48 unpromoted piece types,
rather than 48 piece types total.

9 years agoFix book encoding of Chu promotion moves
H.G.Muller [Tue, 3 Mar 2015 21:17:26 +0000]
Fix book encoding of Chu promotion moves

The Shogi promotion suffix had promotion code 8, which was not available
in Chu at all, due to the large board size. So in stead we use code 1 now.
Code 10 (or 2 in Chu) is reserved for encoding Lion moves, which currently
do not work at all.

9 years agoRemove debug printf for kanji
H.G.Muller [Mon, 2 Mar 2015 21:14:59 +0000]
Remove debug printf for kanji

9 years agoWrap kif comments in braces
H.G.Muller [Mon, 2 Mar 2015 21:12:36 +0000]
Wrap kif comments in braces

The parser assumes that a text that parsed as comment contained
enclosing braces, but in kif files we have to apply those ourselves,
to prevent a bare comment (starting with '*'!) to appear between the moves.

9 years agoImprove reading of pieceToCharTable
H.G.Muller [Mon, 2 Mar 2015 18:59:18 +0000]
Improve reading of pieceToCharTable

The piece-to-char string can now contain ' and ! suffixes on pieces,
which are taken together with the preceding piece ID. An encountered : will
cause the assigning to skip to the chu-promoted series of pieces, however
these are numbered.

9 years agoExtend book to 48 piece types and 256 squares
H.G.Muller [Mon, 2 Mar 2015 18:16:09 +0000]
Extend book to 48 piece types and 256 squares

Before the Zobrist key could only handle 24 piece types and 128 squares.

9 years agoFix reading of startposition FEN starting with *
H.G.Muller [Mon, 2 Mar 2015 12:15:19 +0000]
Fix reading of startposition FEN starting with *

When laoding a position file, a FEN starting with * would not be recognized
as FEN, and parsed in an alternative way that did not like the * either,
and caused a segfault.

9 years agoImplement -rankOffset option
H.G.Muller [Mon, 2 Mar 2015 11:49:36 +0000]
Implement -rankOffset option

This option is useful on boards with blacked-out ranks, to force rank
number one to be a higher up.

9 years agoUse PGN result in Game List build to supply tag
H.G.Muller [Mon, 2 Mar 2015 11:04:58 +0000]
Use PGN result in Game List build to supply tag

If a PGN tag was missing (as in loading of non-PGN game collections)
the game would be marked as unfinished ('*') in the Game List, even
when it contained a result. The kif-format resign messages are now cast
in a form that also recognizes the result-detail message.

9 years agoImplement kifu move disambiguation
H.G.Muller [Sat, 28 Feb 2015 10:05:21 +0000]
Implement kifu move disambiguation

For sliders the Japanese disambiguation clues cannot be translated
to PSN-like disambiguators, so the problem had to be resolved in the
Disambiguate callback, at the time when the second piece of the
requested type is identified, so that the relative position of the pieces
is known.

9 years agoMake move parser understand kif-format Shogi moves
H.G.Muller [Fri, 27 Feb 2015 16:13:52 +0000]
Make move parser understand kif-format Shogi moves

For now only utf-8 kanji are recognized. The recognition of '*' as an
unfinished game end had to be suspended for this, based on encountering of
bare kanji (from the kif header), and is only regained after reading
of a PGN tag!

9 years agoDo not call illegal moves ambiguos
H.G.Muller [Sat, 21 Feb 2015 19:08:00 +0000]
Do not call illegal moves ambiguos

When legality testing is off, an illegal SAN move would be interpreted
as if the mentioned piece type could move anywhere, which lead to an
'Ambiguous Move' message if there were multiple pieces of that type.
This should not be done if the piece moves are known through engine piece commands.

9 years agoFix parsing of illegal drops from PGN
H.G.Muller [Sat, 21 Feb 2015 19:02:06 +0000]
Fix parsing of illegal drops from PGN

These were parsed as if the first two characters were the from-square.

9 years agoFix spurious promo-suffixes on drop moves
H.G.Muller [Fri, 20 Feb 2015 19:27:45 +0000]
Fix spurious promo-suffixes on drop moves

The promo-suffix from the previous move would be left on drop moves,
and could even be set to the engine.

9 years agoLet promotion zone be 3 ranks on 8-rank shogi boards
H.G.Muller [Fri, 20 Feb 2015 14:46:35 +0000]
Let promotion zone be 3 ranks on 8-rank shogi boards

For the benefit of Euro-Shogi the rule that the depth of the promotion
zone is the board height divided by 3, rounded down (which works so well
for mini-, Judkins, Tori and regular Shogi) is given an exception when
the numer of ranks is 8.

9 years agoFix illegal-drop fix
H.G.Muller [Fri, 20 Feb 2015 13:07:40 +0000]
Fix illegal-drop fix

9 years agoSuppress lift command on deselecting piece
H.G.Muller [Wed, 18 Feb 2015 21:54:12 +0000]
Suppress lift command on deselecting piece

A click on the selected piece deselects it, and thus should not
result in a lift command to prompt highlighting of its moves.

9 years agoSuppress appearance of promotion popup when sweep-selecting
H.G.Muller [Wed, 18 Feb 2015 21:49:20 +0000]
Suppress appearance of promotion popup when sweep-selecting

In highlight-induced promotions the popup would appear even when it
should have been off.

9 years agoFix illegal drops
H.G.Muller [Wed, 18 Feb 2015 21:47:30 +0000]
Fix illegal drops

Even white was dropping black pieces on those!

9 years agoFix click-click sweep-select
H.G.Muller [Sun, 15 Feb 2015 22:17:29 +0000]
Fix click-click sweep-select

If the up-click of the second click of a sweep-select would occur in the
from-square, the whole move would be ignored, and de-select the promoting
piece instead.

9 years agoFix promotion sweep of black Pawns in Shogi
H.G.Muller [Sun, 15 Feb 2015 22:12:14 +0000]
Fix promotion sweep of black Pawns in Shogi

The wrap-around when we run past white King should not be done in
toggle mode, where it is guaranteed we won't run out of range.

9 years agoFix deselection of piece
H.G.Muller [Mon, 9 Feb 2015 09:09:55 +0000]
Fix deselection of piece

The patch to allow entering of friendly capture (intended as a kludge
for entering non-standard castling) had broken the ability to change
the selected piece by clicking another piece, as this was now always
interpreted as a friendly capture (which was then rejected as illegal).
By testing marker[][] in stead of legal[][] this can be avoided; legal[][]
was not a good measure, because in absence of a highlight command it
is completely filled with 1, to make everything legal. No friendly squares
will ever get marked unless a highlight command does it, though.

9 years agoFix highlight-induced promotions
H.G.Muller [Mon, 9 Feb 2015 09:01:48 +0000]
Fix highlight-induced promotions

A purple square in the highlight color FEN triggered the promotion
procedure, but the chosen promotion piece would not be suffixed to
the move.

9 years agoCastling fix 1
H.G.Muller [Mon, 9 Feb 2015 09:01:16 +0000]
Castling fix 1

9 years agoTake heed of mnemonic indicator when clipping menu texts
H.G.Muller [Fri, 6 Feb 2015 12:01:44 +0000]
Take heed of mnemonic indicator when clipping menu texts

An underscore in the menu text should not be counted when deciding where
to clip the text to make the menu bar fit the window width. If clipping
would occur immediately after an underscore, just clip off the first
character to get the mnemonic back in view. (This makes _n from the
Engine menu.)

9 years agoLet Betza jO mean castling with non-edge piece
H.G.Muller [Thu, 5 Feb 2015 22:01:48 +0000]
Let Betza jO mean castling with non-edge piece

This is useful in Omega Chess, where the Rooks are not on the edge.
The number of j tell how many pieces have to be between edge and castling
partner.

9 years agoCastle with nearest rather than corner piece
H.G.Muller [Thu, 5 Feb 2015 19:09:53 +0000]
Castle with nearest rather than corner piece

An oversized sideway King step is recognized as castling, but instead
of using the piece closest to the board edge on that rank (ignoring dark
squares) we now use the piece that the King is looking at in that direction.
This fixes castling in Omega Chess.

9 years agoAllow friend-trampling format also for royal castlings
H.G.Muller [Thu, 5 Feb 2015 18:44:10 +0000]
Allow friend-trampling format also for royal castlings

The restriction that the trampling piece should not be King is lifted.
That the piece has an O atom in its Betza string is enough to qualify.

9 years agoRecognize castling double-moves from engine
H.G.Muller [Thu, 5 Feb 2015 18:34:32 +0000]
Recognize castling double-moves from engine

An engine could already send double-moves of the Alien protocol,
where the same piece moved twice, which were then glued into a single
step, with the intermediate square as trampled piece. Now when the
second leg is whith a different piece, it keeps the first leg as overall
move, and tramples the second mover. This translates castlings sent
as two-piece moves to the kludge format of trampling the own 'Rook'.

9 years agoFix drops
H.G.Muller [Thu, 5 Feb 2015 16:35:34 +0000]
Fix drops

9 years agoPrint castlings as double move
H.G.Muller [Thu, 5 Feb 2015 16:33:24 +0000]
Print castlings as double move

9 years agoFix illegal drops
H.G.Muller [Thu, 5 Feb 2015 11:24:00 +0000]
Fix illegal drops

For illegal drops the 'from-square' was subjected to an on-board test,
which of course always failed, after which the move was reclassified
as an ImpossibleMove after all. (Leading to rejection even when legality
testing was off, and error messages like "Could not parse move".)

9 years agoFix width of dual board GTK
H.G.Muller [Tue, 3 Feb 2015 11:49:11 +0000]
Fix width of dual board GTK

The message field here was too wide, because it was attached to a
non-existing table column.

9 years agoFix Tab in ICS command mode
H.G.Muller [Tue, 3 Feb 2015 09:14:56 +0000]
Fix Tab in ICS command mode

Tab was not working to open a chat after oborting opening a new one,
when only one chat was open.

9 years agoFix sending of messages from kibitz or c-shout chat
H.G.Muller [Mon, 2 Feb 2015 15:29:22 +0000]
Fix sending of messages from kibitz or c-shout chat

Kibitz messages and c-shouts could be captured in their own chat window.
like shouts and whispers, but sending messages from such chats did not
get the proper prefixing, but were treated as tells to nonexistent players
'kibitzes' and 'c-shouts'.

9 years agoIgnore Tab in ICS Interaction if no chats assigned
H.G.Muller [Thu, 29 Jan 2015 10:20:37 +0000]
Ignore Tab in ICS Interaction if no chats assigned

Thuis used to open a new chat, but Ctl-N exists for that now.

9 years agoUse Ctl-E in ICS chat to end chat
H.G.Muller [Thu, 29 Jan 2015 10:12:19 +0000]
Use Ctl-E in ICS chat to end chat

9 years agoUse Ctrl-H in ICS Chat to close chat pane
H.G.Muller [Thu, 29 Jan 2015 09:56:45 +0000]
Use Ctrl-H in ICS Chat to close chat pane

This used to be done by <Esc>, but that now focuses board instead.

9 years agoLet <Esc> transfer focus from Board to ICS Input
H.G.Muller [Wed, 28 Jan 2015 22:17:23 +0000]
Let <Esc> transfer focus from Board to ICS Input

<Esc> in the input field of the ICS Interaction window transfers focus
to the board, but there was no way to transfer focus back without actually
typing something in the input field. <Esc> now does that. Unlike typing
printables, it does not close the chat pane, though. In addition, <Esc>
when the chat pane is open now also transfers focus to the board, rather
than closing the chat pane. This makes quick transparent switching between
board and Chat / ICS Interaction possible. It is no longer possible to
simply hide the chat pane, though. But this was usually done for typing
a command, and swicthing to the board with <Esc> and typing the command
there has the same effect.

9 years agoDefine mnemonics for main menu bar
H.G.Muller [Tue, 20 Jan 2015 11:02:19 +0000]
Define mnemonics for main menu bar

9 years agoSet position dir to handicap positions in shogi theme
H.G.Muller [Tue, 20 Jan 2015 10:54:52 +0000]
Set position dir to handicap positions in shogi theme

9 years agoLet file selecor remember last used directory (GTK)
H.G.Muller [Sun, 21 Dec 2014 22:09:25 +0000]
Let file selecor remember last used directory (GTK)

The file selector now starts in the directory that was last used
to load a file of the type we are now browsing for. (Supported types:
pgn, fen, trn, bin, png.)

9 years agoImplement -positionDir option GTK
H.G.Muller [Sat, 20 Dec 2014 19:47:05 +0000]
Implement -positionDir option GTK

This volatile option determines where Load Position starts browsing.

9 years agostash
H.G.Muller [Mon, 17 Nov 2014 12:00:37 +0000]
stash

9 years agoFix click-click moving with -monoMouse
H.G.Muller [Thu, 13 Nov 2014 19:23:57 +0000]
Fix click-click moving with -monoMouse

A to-click should never be interpreted as button 3.

9 years agoImplement -monoMouse option (XB)
H.G.Muller [Thu, 13 Nov 2014 17:33:42 +0000]
Implement -monoMouse option (XB)

With the monoMouse option button-3 is no longer needed in Edit-Position
mode, but a button-1 click on an empty square will automatically behave
as if it was button 3. It can only be used with -pieceMenu false,
as it does not communicate the coordinates of the clicked square.

9 years agoFix crash on using Browse buttons in Tournament dialog Xaw
H.G.Muller [Tue, 11 Nov 2014 13:40:43 +0000]
Fix crash on using Browse buttons in Tournament dialog Xaw

The Xaw file browser assumes the text entries it is browsing for are
all in dialogs of the class TransienDlg, but the Tournament Options
dialog has been altered to MasterDlg, to allow it to co-exist with
Time Control and Common-Engine dialog (which can be opened through
buttons in it). Xaw did not like that, and the true DialogClass is
now used when setting the widget text.

9 years agoFix -addMasterOption option
H.G.Muller [Mon, 10 Nov 2014 13:29:25 +0000]
Fix -addMasterOption option

The comparison of the date stamps in master and user settings file
was broken, because the date stamps were declared as unsigned, so that
the difference would never be negative.

9 years agoAllow creation of DarkSquares in EditPosition mode
H.G.Muller [Mon, 3 Nov 2014 20:59:09 +0000]
Allow creation of DarkSquares in EditPosition mode

Dragging an EmptySquare off board will make it a DarkSquare. Dragging
anything else off board (incl. DarkSquares) makes it empty, as before.

9 years agoLet Clear Board respect DarkSquares
H.G.Muller [Mon, 3 Nov 2014 20:56:29 +0000]
Let Clear Board respect DarkSquares

Usually we will clear the board to set up a new position. Not to
redesign the board shape.

9 years agoFix sweep promotions for Lance on deeper zones
H.G.Muller [Mon, 3 Nov 2014 20:51:46 +0000]
Fix sweep promotions for Lance on deeper zones

Unlike Pawns, Lances always assumed a zone depth of 1 in deciding on
activating sweep promotion. (Because they did not naturally occur in
any variant that had a deeper zone.)

9 years agoFix two-sided non-royal castling
H.G.Muller [Mon, 3 Nov 2014 20:49:07 +0000]
Fix two-sided non-royal castling

9 years agoFix e.p. capture
H.G.Muller [Sun, 2 Nov 2014 20:44:48 +0000]
Fix e.p. capture

9 years agoFix premature disappearence of Lion victims
H.G.Muller [Sun, 2 Nov 2014 14:52:25 +0000]
Fix premature disappearence of Lion victims

The check test did not correctly undo a Lion e.p. capture, which
would make the victim already disappear after entry of the first leg,
which potentially could affect the second leg move generation.
(Not in Lions, though, but in Betza castlings it manifested itself.)

9 years agoImplement non-royal castling
H.G.Muller [Sun, 2 Nov 2014 14:31:34 +0000]
Implement non-royal castling

The Betza move generator allows castlings to be specified on non-royal
pieces, and indeed the Omega-Chess 'guarding' castles Q with R. To
prevent ambiguity this is implemented as a two-leg move QxR-s (with 's'
the target square specified in the O atom). This automatically takes care
of removal of the 'Rook', so that in ApplyMove() we only have to put it
back on the proper side of the 'King'.

9 years agoAlso set e.p. rights on move of Lance
H.G.Muller [Sun, 2 Nov 2014 11:24:16 +0000]
Also set e.p. rights on move of Lance

The Lance is intended as Pawn alternative (because of its slim shape),
except in Superchess (where it represents Amazon) and Chu. (In regular
Shogi the Lace is represented by Queen disguised as Lance!) So it would
be logical to also make its double-Pushes set e.p. rights. Except in
Spartan Chess, which has no e.p. capture.

9 years agoAllow e.p. capture on triple-Push
H.G.Muller [Sun, 2 Nov 2014 10:29:31 +0000]
Allow e.p. capture on triple-Push

Some variants (like Omega Chess) have an initial triple-Push on Pawns,
wich can then e.p.-captured on both of the squares they skip. To allow
the Betza move generator to supply such e.p. captures, a bit flag is
kludged into the EP_RANK state indicator on triple pushes, while the
main value there is that of the rank directly behind the pushed Pawn.
The Betza generator then also matches the square behind it with the
e.p.-capture to-square when the falg is set.
 ApplyMove() also had to be adapted, to remove the Pawn two squares
behind the capturing one, rather than straight behind it, when this
flag is set.

9 years agoMake the promotion zone always 3 deep in Elven Chess
H.G.Muller [Fri, 31 Oct 2014 22:46:13 +0000]
Make the promotion zone always 3 deep in Elven Chess

The promotion zone in Eleven Chess was treated as in Shogi, and set
to the board height divided by 3. It is better to always make it 3.
This only makes a difference when the boardHeight is overruled,
but Elven Chess is a very useful parent variant when a 3-deep promotion
zone is needed. (Makruk would only allow promotion to Ferz, and Grand
Chess would need holdings and allow only promotion to captured pieces.)

9 years agoLocate corner piece in presence of DarkSquares
H.G.Muller [Fri, 31 Oct 2014 21:59:23 +0000]
Locate corner piece in presence of DarkSquares

The 'Rook' move implied by a castling indicated through an obver-sized
King step uses the corner pieces. But the corner isn't necessarily
the edge file if the board is not rectangular, but irregularly shaped
like in Omega Chess. So we have to ignore the DarkSquares, which are
not caounted as belonging to the board.

9 years agoAllow Betza castling with piece next to DarkSquare
H.G.Muller [Fri, 31 Oct 2014 13:26:19 +0000]
Allow Betza castling with piece next to DarkSquare

In variants like Omega Chess the board edges are not really the first
and last file, because of the Wizzard squares. So castling has to be
allowed not only with the piece on those files, but also when the square
beyond them is not part of the board anymore.

9 years agoLet Betza generator respect DarkSquares
H.G.Muller [Fri, 31 Oct 2014 12:54:59 +0000]
Let Betza generator respect DarkSquares

DarkSquares are not pieces, and should not be moved. When landing
on them they should be considered as off-board.

9 years agoConnect OSX Quit menu to ExitEvent
H.G.Muller [Thu, 30 Oct 2014 14:01:59 +0000]
Connect OSX Quit menu to ExitEvent

The Quit menu item provided by OSX was not equivalent to the original
XBoard menu item, as it did not automatically call ExitEvent. (Which
closing the window did.) This meant a hard kill, without saving settings
or the last game, and not properly shutting down the engine(s).
We now catch the OSX 'WillTerminate' event to perform these tasks.

9 years agoAdd USI/UCCI checkbox to Load Engine dialog
H.G.Muller [Tue, 28 Oct 2014 21:37:22 +0000]
Add USI/UCCI checkbox to Load Engine dialog

Assign a default command to the -uxiAdapter when it was not yet defined,
as this will be used after ticking the checkbox, and the compile-time
default for it was an empty string, and will have found its way in
the user settings files of most users (making configuring through
the master settings file pointless).