[ANN] Chess960

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Chess960

Stéphane Rollandin
Hello,

I have fixed a few bugs and somewhat improved the chess game.

Bugs:

- castling was not possible when a rook was menaced
- a test for king attack in black king-side castling was missing
- the cached number of pawns is sometimes off, which could lead to a
DivideByZero error in some endgames (this is fixed, but not the
discrepancy which still effects the material evaluation)
- a pawn taken en-passant was not removed from display

One notable bug left is that undoing a castling move makes it impossible
to castle again.

Improvements:

- nicer display, scalable (with assets from wikimedia common)
- the board is now sticky and cannot be accidentally grabbed
- hints (from the 'help' button) now appear in the status line
- support for Fischer randomized chess, aka Chess960

Changes:

- to castle, one now has to move the king over the rook


To try it:

        Chess960Morph new openInWorld


Stef



Chess960.1.zip (127K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Chess960

marcel.taeumel
Hi Stef!

Nice work! May I add this to the games collection in Trunk, which is currently part of "Etoys-Squeakland-Morphic-Games"?

Best,
Marcel

Am 02.06.2020 16:22:15 schrieb Stéphane Rollandin <[hidden email]>:

Hello,

I have fixed a few bugs and somewhat improved the chess game.

Bugs:

- castling was not possible when a rook was menaced
- a test for king attack in black king-side castling was missing
- the cached number of pawns is sometimes off, which could lead to a
DivideByZero error in some endgames (this is fixed, but not the
discrepancy which still effects the material evaluation)
- a pawn taken en-passant was not removed from display

One notable bug left is that undoing a castling move makes it impossible
to castle again.

Improvements:

- nicer display, scalable (with assets from wikimedia common)
- the board is now sticky and cannot be accidentally grabbed
- hints (from the 'help' button) now appear in the status line
- support for Fischer randomized chess, aka Chess960

Changes:

- to castle, one now has to move the king over the rook


To try it:

Chess960Morph new openInWorld


Stef



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Chess960

Stéphane Rollandin
> Nice work! May I add this to the games collection in Trunk, which is
> currently part of "Etoys-Squeakland-Morphic-Games"?

Sure :)

Stef

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Chess960

marcel.taeumel
Done. :-) I just changed the compression for the chess pieces to PNG to reduce size by about 40%.



Best,
Marcel

Am 03.06.2020 15:01:59 schrieb Stéphane Rollandin <[hidden email]>:

> Nice work! May I add this to the games collection in Trunk, which is
> currently part of "Etoys-Squeakland-Morphic-Games"?

Sure :)

Stef



Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Chess960

Stéphane Rollandin
> Done. :-) I just changed the compression for the chess pieces to PNG to
> reduce size by about 40%.

Ah, and I see you also included the licence. Thanks! BTW what kind of
code did you use to convert the PNG and store it?

Stef

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Chess960

marcel.taeumel
Hi Stef.

I use the following code snippet to convert forms into base-64-encoded PNG:

(ByteArray streamContents: [:s |
   PNGReadWriter putForm: someForm onStream: s]) base64Encoded.

Best,
Marcel

Am 04.06.2020 00:17:49 schrieb Stéphane Rollandin <[hidden email]>:

> Done. :-) I just changed the compression for the chess pieces to PNG to
> reduce size by about 40%.

Ah, and I see you also included the licence. Thanks! BTW what kind of
code did you use to convert the PNG and store it?

Stef