xboard.git
8 years agoFix edit command for double-digit ranks
H.G.Muller [Thu, 7 Jan 2016 22:32:47 +0000]
Fix edit command for double-digit ranks

Rank numbers above 9 were printed as their internal 1-character
representation.

8 years agoAdd duplicat of Lion (and Flying Dragon)
H.G.Muller [Wed, 6 Jan 2016 19:12:10 +0000]
Add duplicat of Lion (and Flying Dragon)

Two more piece types are added: a duplicat of the Lion in the unpromoted
series, and a Flying Dragon as its promoted counterpart. This Lion does
not suffer from the Lion-trading restriction of Chu Shogi, and can be used
as a general piece. Its pictogram is somewhat smaller than that of the
Chu Shogi Lion.

8 years agoFix typos in winboard.c
H.G.Muller [Sun, 3 Jan 2016 13:09:24 +0000]
Fix typos in winboard.c

8 years agoLet parsing of O-O castlings pay attention to castling rank
H.G.Muller [Sun, 3 Jan 2016 11:38:18 +0000]
Let parsing of O-O castlings pay attention to castling rank

The parser assumed O-O and O-O-O castlings would always take place
on the back rank, even when the newly introduced castlingRank array
specified differently.

8 years agoFix FEN castling rank for Knightmate
H.G.Muller [Sun, 3 Jan 2016 11:22:25 +0000]
Fix FEN castling rank for Knightmate

The newly introduced castlingRank array was not correctly set on reading
a FEN for Knightmate, because it was looking for Kings rather than
Unicorns.

8 years agoReplace Flying Dragon piece image by Gnu
H.G.Muller [Sat, 2 Jan 2016 18:53:35 +0000]
Replace Flying Dragon piece image by Gnu

How could we not think of this before!

8 years agoAlso define Lance image for Amazon in WB
H.G.Muller [Tue, 29 Dec 2015 22:37:43 +0000]
Also define Lance image for Amazon in WB

8 years agoUse hoplit helmet for Copper General in Chu Shogi
H.G.Muller [Tue, 29 Dec 2015 22:33:52 +0000]
Use hoplit helmet for Copper General in Chu Shogi

8 years agoSkip in pieceToChar to Tokin always
H.G.Muller [Tue, 29 Dec 2015 21:46:17 +0000]
Skip in pieceToChar to Tokin always

The piece after the skip symbol '/' in the pieceToCharTable was
defined as CHUPROMOTED Pawn, which only is a Tokin in variant chu,
but a Cannon in other variants. The intension was to always skip
to Tokin, though.

8 years agoAssign new images to the new pieces
H.G.Muller [Tue, 29 Dec 2015 21:20:24 +0000]
Assign new images to the new pieces

The 5 new pieces behind Lion, and their chu-promoted versions,
are assigned the 9 new images. The 10th piece gets the Lance image,
to povide a duplicate for this that will not be considered a Pawn
in any variant (so it can be used for Amazon).

8 years agoAdd 2x9 new piece images
H.G.Muller [Tue, 29 Dec 2015 21:13:03 +0000]
Add 2x9 new piece images

Wolf, Camel, Zebra, Dragon, Wizard, Viking, Iron, Copper and Tower
images are added.

8 years agoFix parsing of pieceToChar strings
H.G.Muller [Tue, 29 Dec 2015 19:43:39 +0000]
Fix parsing of pieceToChar strings

The skipping to the chu-promoted series was not working. The character
that triggers the skipping has been changed from : to /, because : is
a narrow character potentially useful as ID suffix.

8 years agoFix color of white SVG pieces
H.G.Muller [Tue, 29 Dec 2015 17:02:08 +0000]
Fix color of white SVG pieces

The newer SVG pieces were bright white, rather than the ivory default color.

8 years agoFix piece command after ID-suffix patch
H.G.Muller [Sat, 19 Dec 2015 10:10:40 +0000]
Fix piece command after ID-suffix patch

Piece IDs without suffix or & behind them to make them count for both
colors were no longer recognized in 'piece' commands, because there
was a null character behind the extracted piece-name field. And this
null character was seen as occurring in the suffix string.

8 years agoFix bare-king adjudication in Atomic
H.G.Muller [Thu, 17 Dec 2015 11:44:09 +0000]
Fix bare-king adjudication in Atomic

In Atomic a bare King cannot win, but it can already have won, when
the last piece of that side captured or destroyed the opponent King
when exploding. The win-to-draw correction now recognizes this
situation, so that the win is uphold there.

8 years agoErase old logo before drawing new one (XB)
H.G.Muller [Wed, 2 Dec 2015 11:53:19 +0000]
Erase old logo before drawing new one (XB)

In case of an invalid or absent logo, the previous logo kept being
displayed. Now the area is painted grai first.
 Also fixes a bug in the expose area.

8 years agoAllow debug output to go to child process (WB)
H.G.Muller [Fri, 27 Nov 2015 20:01:22 +0000]
Allow debug output to go to child process (WB)

A -debugfile name starting with tree slashes will not be interpreted
as a file to write on, but (after stripping the slashes) as an executable
to run, and send the output to. This could be used by an external
broadcasting agaent.

8 years agoFix DarkSquare bug in piece counting
H.G.Muller [Fri, 27 Nov 2015 16:55:13 +0000]
Fix DarkSquare bug in piece counting

When counting pieces for adjudication purposes, a DarkSquare on the
board caused an out-of-bounds access to the counter array.

8 years agoFix piece commands for suffixed piece IDs
H.G.Muller [Thu, 26 Nov 2015 21:12:22 +0000]
Fix piece commands for suffixed piece IDs

Due to signed-/unsigned-char problems piece IDs suffixed with ' or !
would not be recognized. In addition a & behind it would not be correctly
recognized diue to the alignment problem the suffix character caused.
Both issues are fixed now.

8 years agoAllow skipping over black squares
H.G.Muller [Wed, 25 Nov 2015 18:26:54 +0000]
Allow skipping over black squares

'Skip pieces', defined with a 'j' prefix on a slider(asopposedto rider),
which skip the first square(s)of their path irrespective of occupation
should also be able to skip over holes in the board.

8 years agoDisplay new user logo when username is entered
H.G.Muller [Tue, 24 Nov 2015 19:10:27 +0000]
Display new user logo when username is entered

When the Edit->Enter Username type-in was used, a new user logo was
loaded, but not immediately displayed. While the old user logo could
already be up, during a man-machine game. Now it is also immediately
displayed.

8 years agoTry to load bitmaps for all pieces (WB)
H.G.Muller [Tue, 24 Nov 2015 19:00:16 +0000]
Try to load bitmaps for all pieces (WB)

WinBoard only contains build-in bitmaps for the first 22 piece types,
and also only associated filenames with those that can be used to
provide external images. Now a new naming convention for piece images
is introduced, like piece22_49s.bmp for a 49x49 bitmap for solid piece 22.
All pieces that were not loaded according to the old convention now
try to find images with this naming convention if a -pieceImageDirectory
is defined.

8 years agoFix sortng of mate scores
H.G.Muller [Tue, 20 Oct 2015 15:30:34 +0000]
Fix sortng of mate scores

With the new convention for mate scores (100000+DTM), lower numbers
represent faster mates and thus better scores, and the sorting of PVs
in the Engine Output window now takes that into account.

8 years agoPrint mate scores as #N in message field
H.G.Muller [Tue, 20 Oct 2015 15:22:53 +0000]
Print mate scores as #N in message field

8 years agoStart implementing EPD test suites
H.G.Muller [Tue, 20 Oct 2015 13:05:50 +0000]
Start implementing EPD test suites

An option -epd is added that can be used in combination with matchMode
to let XBoard do a test suite on a file of EPDs with a "bm" qualifier.
It would record the time to solution. Reporting still has to be implemented;
as yet unsolved problem is that currently black-to-move EPDs would
be presented to the second engine.

8 years agoSlip in 10 more piece types
H.G.Muller [Tue, 20 Oct 2015 12:43:27 +0000]
Slip in 10 more piece types

Five new piece type without a defined image are added to increase the
length to the unpromoted series from 11 to 16. They all map behind
the Lion, which remains the 11th piece. Five promoted types are added
as well, just before King. No images are defined for these pieces (yet),
not even image-file names, so they can only be used with the 'Tile'
fallback and a user-defined inscription.

8 years agoFix grayout
H.G.Muller [Mon, 19 Oct 2015 16:50:53 +0000]
Fix grayout

8 years agoFix exclusion header fix
H.G.Muller [Fri, 16 Oct 2015 12:40:58 +0000]
Fix exclusion header fix

8 years agoGrayout Machine Match menu when aborting match
H.G.Muller [Thu, 15 Oct 2015 21:41:09 +0000]
Grayout Machine Match menu when aborting match

Clicking the Machine Match menu item when a match or tourney is in
progress will make XBoard drop out of match mode when the game finishes.
The check mark will remain on the item until that moment. But now we
gray out the item to show that the match is scheduled for termination.

8 years agoBase tinyLayout decision on total board width
H.G.Muller [Thu, 15 Oct 2015 18:57:39 +0000]
Base tinyLayout decision on total board width

The decision whether to include system menu and use one-letter main menus
is now taken based on the total board width, rather than the square size,
to account for boards that do have other than 8 files.

8 years agoUse intermediate width menu bar in sizes 37 & 40 (WB)
H.G.Muller [Thu, 15 Oct 2015 18:45:41 +0000]
Use intermediate width menu bar in sizes 37 & 40 (WB)

Due to the increased number of main menus the menu bar wrapped to two lines
in sizes slim and small (which did not use the single-letter 'tinyLayout'
menu texts). An intermediate menu-bar format with 3-letter texts is now
provided as well.

8 years agoDisplay exclusion header only for engines supporting exclusion
H.G.Muller [Thu, 15 Oct 2015 15:25:21 +0000]
Display exclusion header only for engines supporting exclusion

The display of the exclusion header in the Engine Output window is made
dependent on the engine having emitted feature exclude=1 at startup.

8 years agoFix periodic updates GTK
H.G.Muller [Sat, 19 Sep 2015 17:35:07 +0000]
Fix periodic updates GTK

Only the first periodic update event would occur, because the clock function
did not retun True to encourage timer events to keep coming.

8 years agoMake -inscriptions a volatile option
H.G.Muller [Tue, 11 Aug 2015 07:38:19 +0000]
Make -inscriptions a volatile option

Saving unicodein the settings file does not work, and leads to an
octal escape sequence for non-ascii characters, which is not correctly
read back. For now saving thus is avoided.

8 years agoMake inscriptions somewhat smaller and non-bold
H.G.Muller [Fri, 7 Aug 2015 16:45:35 +0000]
Make inscriptions somewhat smaller and non-bold

8 years agoFall back on Tile SVG in pieceImageDirectory
H.G.Muller [Thu, 6 Aug 2015 21:49:02 +0000]
Fall back on Tile SVG in pieceImageDirectory

If a -pieceImageDirectory is given, but a needed piece is not found,
and -inscriptions are specified, we first fall back on a general
image White/BlackTile.svg. This can then serve as a background for the
various inscription glyphs, using the latter to distinguish the pieces.
E.g. the Tile image could be a shogi tile, and the inscriptions an utf8
string of kanji, to create Shogi pieces on the fly.

8 years agoTake account of glyph size when positioning inscriptions
H.G.Muller [Thu, 6 Aug 2015 17:41:28 +0000]
Take account of glyph size when positioning inscriptions

We calculate the position of the inscription from its pango extents.

8 years agoAlso write inscription on dragged piece
H.G.Muller [Thu, 6 Aug 2015 17:14:05 +0000]
Also write inscription on dragged piece

8 years agoUse pango to draw inscriptions
H.G.Muller [Thu, 6 Aug 2015 17:04:22 +0000]
Use pango to draw inscriptions

The cairo 'toy fort' interface apparently cannot handle kanji. So we
switch to renderingthe the inscriptions via pango.

8 years agoLet color of inscription depend on piece ID
H.G.Muller [Wed, 5 Aug 2015 20:40:40 +0000]
Let color of inscription depend on piece ID

Only shogi-promoted piece types (with ID defined as +) will get their
inscription rendered in red.

8 years agoRender inscriptions upside-down for black pieces (XB)
H.G.Muller [Wed, 5 Aug 2015 18:37:25 +0000]
Render inscriptions upside-down for black pieces (XB)

The -inscriptions option is intended to supply the kanji on images of
blank Shogi tiles, and thus have to be flipped for the pieces that play
downward. Depending on the -flipBlack setting and -flipView this can be
either white or black.

8 years agoPrevent printing in non-existing Chat dialog (XB)
H.G.Muller [Mon, 3 Aug 2015 19:59:43 +0000]
Prevent printing in non-existing Chat dialog (XB)

The Xaw build of XBoard crashed in -ics -zp mode when the opponent was
kibitzing. According to a stack trace OutputChatMessage() tried to change
the color of a non-existent button. Although it was not clear how printing
there could be attempted if no chats were defined, the routine now is made
a no-op when the Chat dialog does not exist, by an immediate return.

8 years agoIgnore Continue Later when match already in progress
H.G.Muller [Mon, 3 Aug 2015 19:07:04 +0000]
Ignore Continue Later when match already in progress

We have to prevent the user from changing the tournament file or parameters
for a tourney in progress through pressing 'Continue Later'.

8 years agoRemember tourney-file changes after Continue Later
H.G.Muller [Mon, 3 Aug 2015 18:55:05 +0000]
Remember tourney-file changes after Continue Later

After leavingthe Tournament dOptions dialog with Continue Later,
the tournament file would not be set to the entered value, and re-opening
the dialog would keep using the previous value, or a newly generated one.

8 years agoCorrectly remember checkboxes on Continue Later (WB)
H.G.Muller [Mon, 3 Aug 2015 18:39:31 +0000]
Correctly remember checkboxes on Continue Later (WB)

The WinBoard tournament dialog could be left in an inconsistent state
on Continue Later, when the user untickedthe checkboxes for auto-stepping
and two games per line, after on an earlier attempt their ticking had
already resulted in settng the line/position index to a negative value.
Negative values left in the numeric entriesare now reset to 0 when the
chackboxes are unticked.

8 years agoFix bridge capture of Lions
H.G.Muller [Fri, 24 Jul 2015 21:55:35 +0000]
Fix bridge capture of Lions

Clearing the kill square for the check test had broken the test for it
being empty or containing a Pawn. We now also test for Go Between,
which was not done at all.

8 years agoFix Shogi promotion popup
H.G.Muller [Fri, 24 Jul 2015 21:48:58 +0000]
Fix Shogi promotion popup

With the new promotion defaults Shogi was using the Chess promotion
popup rather than the Shogi (yes/no) one.

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