xboard.git
9 years agoAdd persistent Boolean option -fixedSize
H.G.Muller [Thu, 23 Oct 2014 21:33:18 +0000]
Add persistent Boolean option -fixedSize

When set, this option suppresses sizing of the board and clocks when
the window is sized by the user. This is achieved by wrapping the entire
dialog in a non-expanding hbox.

9 years agoAlso do dual-royal test in variant shogi
H.G.Muller [Thu, 23 Oct 2014 19:23:14 +0000]
Also do dual-royal test in variant shogi

For the benefit of Sho Shogi we also have to be prepared to find a
Crown Prince in variant shogi, so it can be used as a parent variant
for Sho Shogi with legality testing on.

9 years agoFix promotion in Betza move generator
H.G.Muller [Thu, 23 Oct 2014 14:22:54 +0000]
Fix promotion in Betza move generator

The Betza move generator was geenrating allmoves as NormalMove, but in
that case XBoard would not allow the move to have a promotion suffix.
Now Pawns and Lances reaching last rank will be assumed to promote.

9 years agoAttempt to make GTK sizing work with tiling WM
H.G.Muller [Wed, 22 Oct 2014 11:06:25 +0000]
Attempt to make GTK sizing work with tiling WM

The Rezise routine now takes the size of the entire dialog table
(for me always equal to the outer-window size), and checks if the
actual outer window is smaller. If it is, it shrinks the board to fit,
under the assumption that a tiling window manager offers only a limited
'viewport' to our dialog, and we want everything to be visible inside that.

9 years agoFix -xbuttons window width GTK
H.G.Muller [Wed, 22 Oct 2014 09:04:47 +0000]
Fix -xbuttons window width GTK

Because Label options not followed by a SAME_ROW element were only
packed into the first two columns of the dialog table, the board window
reserved space for a third column behind the message window if there
was no button bar.

9 years agomac: only use gtk compile flag, if osxapp is enabled
Arun Persaud [Wed, 22 Oct 2014 03:37:41 +0000]
mac: only use gtk compile flag, if osxapp is enabled

9 years agoPrevent unknown variant getting button in -ncp mode
H.G.Muller [Tue, 21 Oct 2014 20:40:39 +0000]
Prevent unknown variant getting button in -ncp mode

Normally we fake the engines play the requested variant, for the benefit
of engines that do not send a variants feature (e.g. v1 engines). But this
should not be done if there is no engine, as it would lead XBoard to
believe an unknown variant name is an engine-defined variant supported
by a currently loaded engine, and create a button for it in the New Variant
dialog.

9 years agoFix variant-name recognition
H.G.Muller [Tue, 21 Oct 2014 20:07:09 +0000]
Fix variant-name recognition

StringToVariant did recognize whether the name to recognize had suffuxes
compared to the tabulated name, but not if it had prefixes. So 'shoshogi'
would be recognized as 'shogi'.

9 years agoSuppress duplicat autoInstalls
H.G.Muller [Tue, 21 Oct 2014 19:52:21 +0000]
Suppress duplicat autoInstalls

If the engine line constructed for -autoInstall already occurs in
the engine list, we should not install it again.

9 years agoBase new square size on board widget allocation GTK
H.G.Muller [Tue, 21 Oct 2014 16:41:03 +0000]
Base new square size on board widget allocation GTK

No longer pay attention to the size of the top-level window, but base
everything on the size of the board widget itself.

9 years agoIgnore first configure event
H.G.Muller [Tue, 21 Oct 2014 11:45:51 +0000]
Ignore first configure event

The first configure event will be the one that adds the window decorations
to the board window, and must not be used to calculate a new square size,
but to expand the outer window instead.

9 years agoLet GTK dialogs open with actual-size Graph widgets
H.G.Muller [Tue, 21 Oct 2014 09:35:21 +0000]
Let GTK dialogs open with actual-size Graph widgets

The Graph Option size values are now uses as size_request, to give
proper dialog sizing at popup. But the size_request is then reset
so that free sizing by the user becomes possible.

9 years agoFix display of Spin Options with negative range
H.G.Muller [Sun, 19 Oct 2014 11:16:43 +0000]
Fix display of Spin Options with negative range

9 years agoline numbers in PO got updated
Arun Persaud [Sat, 18 Oct 2014 04:35:25 +0000]
line numbers in PO got updated

9 years agoupdated ChangeLog, DIFFSTAT and SHORTLOG
Arun Persaud [Sat, 18 Oct 2014 04:23:47 +0000]
updated ChangeLog, DIFFSTAT and SHORTLOG

9 years agoupdated NEWS
Arun Persaud [Sat, 18 Oct 2014 04:17:56 +0000]
updated NEWS

9 years agoforget a few __APPLE__ ifdefs; changed to OSXAPP
Arun Persaud [Sat, 18 Oct 2014 04:17:28 +0000]
forget a few __APPLE__ ifdefs; changed to OSXAPP

9 years agofix typo and prefix
Arun Persaud [Fri, 17 Oct 2014 07:01:44 +0000]
fix typo and prefix

AC_PREFIX_DEFAULT was always set, even if AS_IF didn't get called? Some kind of caching?
Using just prefix=... seems to work though

9 years agoUSE OSXAPP instead of APPLE and fix withval->enableval in AC_ARG_ENABLE
Arun Persaud [Fri, 17 Oct 2014 06:34:22 +0000]
USE OSXAPP instead of APPLE and fix withval->enableval in AC_ARG_ENABLE

9 years agoMerge branch 'master' into v4.8.x
Arun Persaud [Fri, 17 Oct 2014 06:14:42 +0000]
Merge branch 'master' into v4.8.x

9 years agoFix loading of engine-defined PGN games
H.G.Muller [Thu, 16 Oct 2014 19:44:33 +0000]
Fix loading of engine-defined PGN games

Somehow there could be disagreement over what the official opening
position of an engine-defined variant was during loading of the game.
It then refused Betza-defined castling, which tests the corner pieces
based on this initial position. We now assume the FEN tag, which such
a PGN game will always contain, holds the official opening position,
so that castling will always be assumed possible (if there is a corner
piece).

9 years agoPreserve parent variant for PGN of engine-defined game
H.G.Muller [Thu, 16 Oct 2014 18:29:27 +0000]
Preserve parent variant for PGN of engine-defined game

Rather than decoding an unknown variant name, (which will result in
'normal'), we keep the currently set (parent) variant when an
engine-defined variant is currently set that matches the name in
the PGN variant tag of the loaded game.

9 years agoFix some uninitialized variable bugs
H.G.Muller [Thu, 16 Oct 2014 15:54:13 +0000]
Fix some uninitialized variable bugs

The writing of Seirawan castling rights in FEN was still dependent on a
now unused variable, and encountering a VariantMen tag in a PGN file
could have created the misconception the memory was full.

9 years agoUpdate Game List after tag selection changed
H.G.Muller [Thu, 16 Oct 2014 15:41:01 +0000]
Update Game List after tag selection changed

When the Game List Options dialog changes the tags to be displayed in
the Game List lines, we now automatically redo the entire Game List.

9 years agoAlways accept piece commands in variant great
H.G.Muller [Thu, 16 Oct 2014 14:38:00 +0000]
Always accept piece commands in variant great

Great Shatranj belongs to the variants XBoard does not know the rules of,
and should thus always accept engine piece commands.

9 years agomake all tests for strings in configure use the same scheme
Arun Persaud [Thu, 16 Oct 2014 04:28:36 +0000]
make all tests for strings in configure use the same scheme

9 years agoupdated Changelog, DIFFSTAT, and SHORTLOG
Arun Persaud [Thu, 16 Oct 2014 04:23:26 +0000]
updated Changelog, DIFFSTAT, and SHORTLOG

9 years agofix osxapp enable option in configure.ac
Arun Persaud [Thu, 16 Oct 2014 04:06:36 +0000]
fix osxapp enable option in configure.ac

9 years agoremove experimental from gtk build option
Arun Persaud [Thu, 16 Oct 2014 04:06:00 +0000]
remove experimental from gtk build option

9 years agoonly enable osxapp build target on apple systems, clean up configure.ac a tiny bit
Arun Persaud [Thu, 16 Oct 2014 04:02:38 +0000]
only enable osxapp build target on apple systems, clean up configure.ac a tiny bit

9 years agoupdate NEWS file
Arun Persaud [Thu, 16 Oct 2014 03:57:28 +0000]
update NEWS file

9 years agoMerge branch 'master' into v4.8.x
Arun Persaud [Thu, 16 Oct 2014 03:50:51 +0000]
Merge branch 'master' into v4.8.x

9 years agoDon't switch to engine-defined variant on game loading
H.G.Muller [Wed, 15 Oct 2014 21:48:14 +0000]
Don't switch to engine-defined variant on game loading

When loading a game from PGN the variant tag will have been decoded as
'normal' in case of an engine-defined variant, and we certainly would
not want to switch to that. Better stay in the variant the user had
selected before, and hope for the best.

9 years agoImplement displaying of variant tag in Game List
H.G.Muller [Wed, 15 Oct 2014 19:50:44 +0000]
Implement displaying of variant tag in Game List

The variant tag was displayed as an empty string in game-header lines.
Processing it during PGN load was not able to handle engine-defined
variants anyway; they were recognized as 'normal'. A new field in the
GameInfo struct now holds variantName in text form, and this is the
primary place from which it is displayed in the Game List.

9 years agoUpdate Game List when setting new Game List Tags
H.G.Muller [Wed, 15 Oct 2014 19:06:53 +0000]
Update Game List when setting new Game List Tags

Using the Game List Tags dialog to alter the gae header lines now
automatically causes an update of the Game list according to the new
tags specification.

9 years agoReset move entry on Clear Board
H.G.Muller [Wed, 15 Oct 2014 18:26:31 +0000]
Reset move entry on Clear Board

The board markers would stay on when the board was cleared, and a
no-longer-present piece would stay selected, leading to deletion of the
first piece that you tried to select.

9 years agoSplit Tournament dialog in side-by-side panes
H.G.Muller [Tue, 14 Oct 2014 07:38:05 +0000]
Split Tournament dialog in side-by-side panes

This seems to cure a sickness in some Xaw versions, which refused
to display text in the text widgets, or make them sensitive for mouse
clicks if the last three buttons were added. It also helps keeping
the 'OK' button on-screen in the GTK version.

9 years agoRemember position obtained from setup
H.G.Muller [Sun, 12 Oct 2014 17:43:24 +0000]
Remember position obtained from setup

When the engine sends a setup command, it should be remembered as
initialPosition, in order for the castling 'rook' test of the Betza
move generator to work.

9 years agoAdd build script to configure for a XBoard.app for OS X
Joshua Pettus [Sat, 13 Sep 2014 19:35:12 +0000]
Add build script to configure for a XBoard.app for OS X

This relies on the the gtk build and adds some special code in
gtk/xboard.c so that XBoard can be installed inside the app directory
independ on where the app file is located.

9 years agoreplaced hardcoded pngdir with built-in ~~
Arun Persaud [Sun, 12 Oct 2014 17:09:51 +0000]
replaced hardcoded pngdir with built-in ~~

don't need to create xboard.conf from xboard.conf.in anymore

9 years agoSome improvement on new Shogi SVG pieces
H.G.Muller [Sat, 11 Oct 2014 22:18:50 +0000]
Some improvement on new Shogi SVG pieces

9 years agoupdated spanish, ukranian, and dutch translation
Arun Persaud [Sat, 11 Oct 2014 17:55:41 +0000]
updated spanish, ukranian, and dutch translation

9 years agoMerge branch 'master' into v4.8.x
Arun Persaud [Sat, 11 Oct 2014 17:53:46 +0000]
Merge branch 'master' into v4.8.x

9 years agoFix logos Xaw
H.G.Muller [Sat, 11 Oct 2014 17:42:03 +0000]
Fix logos Xaw

The patch for logo standard left a typo and an excess line in the Xaw
version. This is fixed, and also implements the user-logo cascade for
the Xaw version.

9 years agoTry also /home/<user>/.logo.pgn for user logo
H.G.Muller [Sat, 11 Oct 2014 17:26:23 +0000]
Try also /home/<user>/.logo.pgn for user logo

The user logo now also has a cascade, first looking in the user's home
folder for a file .logo.png, and then in the -logoDir for <user>.png.

9 years agoFix ICS logo display
H.G.Muller [Sat, 11 Oct 2014 14:38:03 +0000]
Fix ICS logo display

9 years agoShow current variant on New Variant buttons GTK in bold
H.G.Muller [Fri, 10 Oct 2014 16:14:09 +0000]
Show current variant on New Variant buttons GTK in bold

If an engine-defined variant is selected, we compare its name to the
inscription on the button, otherwise we compare the variant numbers.
(Test to trigger this is a bit awkward, to not inadvertantly apply it
to the ICS Text Menu, which also has colored buttoms.)

9 years agoIncrease number of engine-defined-variants Buttons XB
H.G.Muller [Fri, 10 Oct 2014 15:01:51 +0000]
Increase number of engine-defined-variants Buttons XB

An third column is added to the New Variant dialog when necessary.

9 years agoForce GTK logo size to quarter board width
H.G.Muller [Thu, 9 Oct 2014 21:25:26 +0000]
Force GTK logo size to quarter board width

This is what GTK will do anyway, because clocks and logos are in a hbox
that equally divides space, so telling XBoard different just misinforms it.

9 years agoReplace default Shogi pieces
H.G.Muller [Thu, 9 Oct 2014 15:08:45 +0000]
Replace default Shogi pieces

The SVG Shogi pieces are replaced by a new set, made by Joshua Pettus.
This set also contains and Elephant and Crown Prince.

9 years agoImplement new logo standard
H.G.Muller [Thu, 9 Oct 2014 07:35:33 +0000]
Implement new logo standard

XBoard now looks in the system directories for plugin logos,
/usr/(local/)share/games/plugins/logos, according to the cascade
-logoDir, engine dir (-fd,-sd), /usr/local/..., /usr/...

9 years agoRelocate OS X' LOCALEDIR
H.G.Muller [Thu, 9 Oct 2014 06:47:25 +0000]
Relocate OS X' LOCALEDIR

9 years agoFix check test with multi-leg moves
H.G.Muller [Wed, 8 Oct 2014 19:56:28 +0000]
Fix check test with multi-leg moves

The check test after a multi-leg move was still using the same kill
square in the opponent's reply, making it blind to King captures in
a second leg. So far we got away with that because the Shogi multi-leg
pieces also can reach all their potential victims in a single step,
but with engine-defined multi-leg moves there is no guarantee this
will always be the case.

9 years agoFix infinite loop in cylinder moves
H.G.Muller [Wed, 8 Oct 2014 19:55:17 +0000]
Fix infinite loop in cylinder moves

9 years agoLet t on final leg in Betza notation forbid checking
H.G.Muller [Tue, 7 Oct 2014 17:13:54 +0000]
Let t on final leg in Betza notation forbid checking

To allow approximate definition of pieces that are too difficult to
describe exactly, we can revoke their capture rights on Kings,
to prevent imagined moves that happen to threaten a King forces the
opponent to evade this imagined check, making most of his moves illegal.
Then the piece can be safely replaced by an upward-compatible one,
leaving rejection of the extra moves to the engine.

9 years agoImplement Betza hr and hr as chiral move sets
H.G.Muller [Tue, 7 Oct 2014 16:56:59 +0000]
Implement Betza hr and hr as chiral move sets

To easily separate right- and left-handed moves on oblique atoms
(which needs opposite use of l and r in their multi-leg continuations),
the direction sets hr and hl are added.

9 years agoPreserve other Betza mode bits on setting default modality
H.G.Muller [Tue, 7 Oct 2014 06:20:06 +0000]
Preserve other Betza mode bits on setting default modality

9 years agoSwitch to new Betza orth-diag conversion standard
H.G.Muller [Mon, 6 Oct 2014 18:20:00 +0000]
Switch to new Betza orth-diag conversion standard

The interconversion from orthogonal to diagonal atoms is now possible
for any 4-way atom, based on specification of an 'in-between' direction,
irrespective of modality. Also take backward out of default continuation
direction-set.

9 years agoImplement Betza t modifier for hop-own
H.G.Muller [Fri, 3 Oct 2014 08:31:47 +0000]
Implement Betza t modifier for hop-own

The 't' modifier will restrict any form of hopping as specified by
p or g modifiers to friendly pieces. This only works on non-final legs.

9 years agoImplement directional modifiers on KQ, and let y&g upgrade
H.G.Muller [Thu, 2 Oct 2014 17:32:45 +0000]
Implement directional modifiers on KQ, and let y&g upgrade

The Betza y and g modifiers now not only change range, but also upgrade
the directional capabilities of the atom to full non-degenerate 8-fold.
Directional modifiers can now be used in that symmetry too, to maximally
exploit this, and implement 4-fold pieces that make 45-degree turns.
Let oblique continuation legs also use the non-degenerate system.

9 years agoImplement Betza y modifier
H.G.Muller [Thu, 2 Oct 2014 13:19:09 +0000]
Implement Betza y modifier

The non-standard modifier 'y' is the spontaneous counterpart of 'g',
changing the range of the atom, and upgrading its directionality.

9 years agoImplement Betza g modifier for non-final legs
H.G.Muller [Thu, 2 Oct 2014 08:21:43 +0000]
Implement Betza g modifier for non-final legs

The g modifier is implemented as a p that turns a rider into the
corresponding leaper when it hops, and vice versa. This is done by
stripping off any existing range indicator, and making the range
infinite by suffixing '0' when the old range was 1 (whether implied
or explicitly written). Except that for sliders/steppers this is done
by atom-name conversion after stripping off the range. Limited range
thus in general turns into leaper (D -> D0, Dn -> D), but with FWK
W3 -> R and R3 -> W, etc.

9 years agoImplement Betza a modifier
H.G.Muller [Wed, 1 Oct 2014 13:32:14 +0000]
Implement Betza a modifier

This is pretty complex, and might overload the current primitive two-leg
legality testing when pieces are defined that can reach squares only in
two legs.

9 years agoImplement Betza j on W,F as skip first square
H.G.Muller [Wed, 1 Oct 2014 07:28:32 +0000]
Implement Betza j on W,F as skip first square

9 years agoAlways accept piece commands for Falcon and Cobra
H.G.Muller [Sat, 4 Oct 2014 19:56:14 +0000]
Always accept piece commands for Falcon and Cobra

The wild-card pieces Falcon and Cobra do not have any moves assigned to
them, and XBoard would accept any move for them even when legality
checking is on. So for these pieces it is always better to trust the
engine's piece definition.

9 years agoFix pieceToCharTable of Falcon Chess
H.G.Muller [Sat, 4 Oct 2014 19:52:51 +0000]
Fix pieceToCharTable of Falcon Chess

This variant was using the Falcon piece, but defining ID F for the
unused Lance instead.

9 years agoDon't preserve setup position on board-size change
H.G.Muller [Sat, 4 Oct 2014 17:59:13 +0000]
Don't preserve setup position on board-size change

Normally the setup command sent by an engine is ignored if the user
already has set up a position, to not render it impossible to do the
latter. But if the setup command orders a different board size nothing
the user has set up can possibly remain valid.

9 years agoReset move entry on stepping through game
H.G.Muller [Sat, 4 Oct 2014 17:39:06 +0000]
Reset move entry on stepping through game

A forward or backward step through the game after selecting a from-square
did not erase the latter, so that it became impossible to select a
from-square for an opponent move, as it would be interpreted as the
to-square for the patially entered move. This was especially annoying
with legality testing off, as the legality test there, based on the
square markings, does not reset the entry state either, but waits
until you do click a legal to-square, so that you had to attempt
moving with pieces of the side not to move to get out of this state.
Now stepping through another position will reset the move-entry state
completely, always considering the first click a from-square selection.

9 years agoFix engine-defined variant as startup
H.G.Muller [Tue, 7 Oct 2014 18:55:00 +0000]
Fix engine-defined variant as startup

Non-standard names were all recognized as 'normal' in InitBackend1().
Now if the -variant argument was not "normal", it is assumed to be an
engine-defined variant if we run with engine.

9 years agoFix clipping of board GTK
H.G.Muller [Tue, 7 Oct 2014 16:53:50 +0000]
Fix clipping of board GTK

ResizeBoardWindow now measures the with of the window dressing by
brute force, interrogating GTK both for the width of the top-level
window and the board widget, and subtracting the two.

9 years agoFix writing of Seirawan960 virginity in FEN
H.G.Muller [Wed, 8 Oct 2014 16:28:09 +0000]
Fix writing of Seirawan960 virginity in FEN

When variant seirawan was played with Fischer castling, only the
castling rights were written, and not the virginity of other pieces.
Now all virgin files are dumped in Shredder-FEN style.

9 years agoupdate po/pot files
Arun Persaud [Tue, 30 Sep 2014 04:07:17 +0000]
update po/pot files

9 years agonew version number for release 4.8.0
Arun Persaud [Tue, 30 Sep 2014 04:00:42 +0000]
new version number for release 4.8.0

9 years agofixed whitespace error in configure.ac for os x
Arun Persaud [Sat, 13 Sep 2014 21:33:37 +0000]
fixed whitespace error in configure.ac for os x

9 years agoupdate gettext configuration to not include any generated files in git
Arun Persaud [Sat, 20 Sep 2014 17:06:17 +0000]
update gettext configuration to not include any generated files in git

before we had a somewhat mixed setup, which seems to create problems
when a different gettext version was installed on the users machine compared
to the version used to generate the files in git. This should solve
the problem. The user will now have to generate these files using autopoint,
which we call from autogen.sh.

9 years agoConfigure XBoard for -size 49 in master settings
H.G.Muller [Sun, 28 Sep 2014 20:19:00 +0000]
Configure XBoard for -size 49 in master settings

Now the code for auto-sizing works, it turns out this does more harm than
good in the GTK build, as it takes maximum size that fits the screen as
initial size, and the board window then cannot be shrunk below that.
So we configure a hard -size 49 for a cold startup.

9 years agoImplement ff etc. in Betza parser
H.G.Muller [Sun, 28 Sep 2014 19:27:22 +0000]
Implement ff etc. in Betza parser

Dupliacated directional modifiers can be needed with oblique moves
to unambiguously specify a direction set, e.g. ffrrN.

9 years agoRename PGN Pieces tag to VariantMen
H.G.Muller [Sun, 28 Sep 2014 11:40:13 +0000]
Rename PGN Pieces tag to VariantMen

Following a suggestion from Steven Edwards, this indeed makes a much
clearer name. Also add code to skip the tag on reading, rather than
allowing it to end up with the 'extra tags', as the latter could lead
to duplication of the tag on subsequent saves.

9 years agoSuppress use of promo-Gold bitmaps in Tori Shogi (WB)
H.G.Muller [Sun, 28 Sep 2014 09:18:10 +0000]
Suppress use of promo-Gold bitmaps in Tori Shogi (WB)

In Tori Shogi the Swallow Pawn does not promote to Tokin, so the use
of a Gold General pictogram would only be confusing. So we stick to
the regular fairy bitmaps in Tori, which is recognized by the board
having 7 ranks in Shogi.

9 years agoPrevent board-size oscillations
H.G.Muller [Sun, 28 Sep 2014 08:55:10 +0000]
Prevent board-size oscillations

It could happen that after resize there was room for enlarging the
squares by one pixel, but that this crossed the boundary where the line
gaps also become wider, and there is no room for making both squares
and line gap. This would cause perpetual oscillations of the window size.
Resizing is now suppressed when a 1-pixel square-size increase would also
result in a line-gap increase.

9 years agoAllow use of second-row pieces for non-promoted in drop games
H.G.Muller [Sun, 28 Sep 2014 08:09:17 +0000]
Allow use of second-row pieces for non-promoted in drop games

Second-row pieces were automatically demoted on capture, but this
should really happen only when the piece-to-char table says it is a
shogi-promoted piece (assigned a '+' there). Pieces assigned a letter
should really stay themselves.
 PieceToNumber had to be adapted to skip '+' pieces in order to count
correctly for second-row pieces, as did the code in UserMoveEvent() that
mapped the from-square onto the piece type. (Why do we do that anyway?
The piece type was displayed on the from-square!)

9 years agoFix reset of 50-move counter on FRC castling
H.G.Muller [Fri, 26 Sep 2014 18:24:05 +0000]
Fix reset of 50-move counter on FRC castling

The FxR internal representation was taken a bit too seriously!

9 years agoFix abort of machine game on variant mismatch
H.G.Muller [Fri, 26 Sep 2014 18:15:33 +0000]
Fix abort of machine game on variant mismatch

When the second engine did not support the current variant, and we clicked
Two Machines, there was an error popup, but the Two Machines menu item
stayed checkmarked. Now we explicitly uncheck it, and switch to EditGame
mode.

9 years agoMake unsupported variant on loading 1st engine non-fatal
H.G.Muller [Fri, 26 Sep 2014 17:47:08 +0000]
Make unsupported variant on loading 1st engine non-fatal

Like in the startup code, when the loaded engine does not play the
currently selected variant, we now figure out what the engine does play,
and switch to that. The error message still pops up, but not non-fatal.

9 years agoPrint PGN Piece tag listing engine-defined pieces
H.G.Muller [Thu, 25 Sep 2014 21:37:24 +0000]
Print PGN Piece tag listing engine-defined pieces

A newly defined PGN tag is printed, which summarizes all non-standard
pieces. Black copies of identically named white pieces are suppressed.
In the future also non-standard naming should be reported here.

9 years agoAlways accept piece commands in partly supported variants
H.G.Muller [Thu, 25 Sep 2014 17:11:21 +0000]
Always accept piece commands in partly supported variants

Normally piece commands are ignored when legality checking is on, as
XBoard's idea of legality should obviously overrule the engine's.
In variants that are not or only partly supported, however, XBoard has
no own idea of what is legal, so it is better to take the engine's
advice than enforcing wrong rules.

9 years agoSize seek graph to also cover board rim WinBoard
H.G.Muller [Thu, 25 Sep 2014 10:29:15 +0000]
Size seek graph to also cover board rim WinBoard

The seek graph always used the plain board size, but in WB it is
possible to diplay a rim around the board, and the seekgraph would
then be positioned in the upper-left corner of the rim, leaving the
lower and right board edge and rim uncovered. Its size is now increased
to fill the entire window (as leaving a rim around it seems not useful).

9 years agoReparse ambiguous move under built-in rules
H.G.Muller [Thu, 25 Sep 2014 09:48:00 +0000]
Reparse ambiguous move under built-in rules

When a move parses as ambiguous under engine-defined piece locomotion,
we re-parse it with XBoard's native idea of the pieces, just in case
it is a move from a game that was saved without the engine having
redefined the pieces. This keeps games created before the introduction
of the 'piece' command loadable.

9 years agoPrevent multi-path moves from parsing as ambiguous
H.G.Muller [Thu, 25 Sep 2014 09:14:06 +0000]
Prevent multi-path moves from parsing as ambiguous

In Cylinder Chess the MovesFromString() generator might generate duplicate
moves, one wrapping, the other direct. When they were both counted as
matching the SAN input move, Disambiguate() would think it an ambiguous
move. So a move that came from the same square as the one we already
have must not be counted.

9 years agoFix cross-edge e.p. capture in Cylinder Chess
H.G.Muller [Wed, 24 Sep 2014 19:47:59 +0000]
Fix cross-edge e.p. capture in Cylinder Chess

ApplyMove() did not remove the e.p. victim when an edge-crossing e.p.
capture was made, because e.p. rights are only set to neighboring files
(after checking there is a Pawn there to capture). The e.p. heuristic
has now been changed to also assume e.p. on file-changing Pawn moves
that span a large number of files, assuming that these will be wrapping
moves. Eventually we should change to better e.p. logic that can be
integrated with engine-configured move generation, as the current system
would fail for any Pawn that captures more than just neighbor ranks.

9 years agoImplement Betza o modifier for cylinder boards
H.G.Muller [Wed, 24 Sep 2014 17:43:27 +0000]
Implement Betza o modifier for cylinder boards

9 years agoImprove virginity test for engine-defined pieces
H.G.Muller [Wed, 24 Sep 2014 15:02:37 +0000]
Improve virginity test for engine-defined pieces

Two squares in the board are now reserved for flags that indicate
whether back-rank pieces have been touched. This allows MovesFromString()
to accurately test virginity of these pieces, rather than having to assume
it when the piece matches that in the opening position. For other ranks
the latter test is still used, as these are normally (irreversible) Pawns,
which cannot return there (and in drop games, when they would, would again
be considered virgin enough for the purpose of double-pushing!).

9 years agoImplement Betza p and g modifiers in piece command
H.G.Muller [Wed, 24 Sep 2014 11:20:31 +0000]
Implement Betza p and g modifiers in piece command

9 years agoRepair piece defs with showTargetSquares off
H.G.Muller [Wed, 24 Sep 2014 06:28:40 +0000]
Repair piece defs with showTargetSquares off

The proxy legality checking based on marking of target square was
rejecting all moves when target squares were not highlighted.

9 years agoAllow definition of castling in piece command
H.G.Muller [Tue, 23 Sep 2014 19:53:55 +0000]
Allow definition of castling in piece command

Castling is defined by the O atom, with a suffix indicating the number
of steps the King must step in the direction of the corner. Kings keep
their normal castling unless overruled by this. Can currently only be
used on the variant's royal piece, as XBoard's ApplyMove() is not smart
enough to understand displacing the corner piece is implied when it is
used on other pieces.

9 years agoUpdate description of piece command in protocol specs
H.G.Muller [Tue, 23 Sep 2014 19:49:44 +0000]
Update description of piece command in protocol specs

9 years agoImprove SAN of Pawn moves and allow Betza e.p. definition
H.G.Muller [Tue, 23 Sep 2014 12:52:16 +0000]
Improve SAN of Pawn moves and allow Betza e.p. definition

The move descriptions in 'piece' commands can now use 'i' and 'n'
modifiers to define a blockable double push. ('n' only work for moves
of stride 2!) The test for initial moves now is based on comparison with
the opening position, rather than on a way-to-generous heuristic. (This
still does not prove in generak the piece did not move, though, but it
does for Pawns.) A new 'e' modifier stands for e.p. capture; to implement
this the rank and file of the e.p. square are now stored in the board.
(EP_STATUS was holding the file of the moved Pawn, which in Berolina Chess
is not the file of the e.p. square!)
 The generation of SAN moves for Pawns can now reliably distinguish between
captures and non-captures even in Berolina, when the move generator informs
it whether the move was e.p. capture.

9 years agoRetune -stickyWindows GTK
H.G.Muller [Mon, 22 Sep 2014 20:48:50 +0000]
Retune -stickyWindows GTK

This still does not work well, and in particular windows refuse to stick
to the top of the board window.

9 years agoFix detection of screen size GTK
H.G.Muller [Mon, 22 Sep 2014 19:59:00 +0000]
Fix detection of screen size GTK

A gdk call that can get the screen without there first being a window
mapped to it is used now. This fixes initial sizing of the board window
on a cold start.

9 years agoConfigure a size for the Eval Graph
H.G.Muller [Mon, 22 Sep 2014 19:57:23 +0000]
Configure a size for the Eval Graph

If no size for the Eval Graph window is configured in the master
settings file, the window will pop up as 2x4 pixels.