Eschecs FreeBASIC (UCI chess GUI)
Re: Eschecs
Hi Roland
Thanks for the continued development of Eschecs - it really is an excellent app
Thanks for the continued development of Eschecs - it really is an excellent app
Re: Eschecs
Hi Roland,
Very nice program you have there.
Cheers,
Adrian
Very nice program you have there.
Cheers,
Adrian
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
@FB_Numpty
Thank you for your support.
@ahuang
Welcome to the forum! I am glad that you like my program.
Thank you for your support.
@ahuang
Welcome to the forum! I am glad that you like my program.
Re: Eschecs
Hi Roland,
Just downloaded 0.9.3 and will give it a try.
Congratulations on keeping your project alive for so long (4 years is a LONG time in computer terms :-) ), and thanks for sharing your work.
Just a suggestion: are you able to edit your first post, so that people don't have to look through the whole thread for the latest version?
Keep up the good work!
Just downloaded 0.9.3 and will give it a try.
Congratulations on keeping your project alive for so long (4 years is a LONG time in computer terms :-) ), and thanks for sharing your work.
Just a suggestion: are you able to edit your first post, so that people don't have to look through the whole thread for the latest version?
Keep up the good work!
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hi Amundo!
Thank you for your support. I edited the first post.
Thank you for your support. I edited the first post.
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hello! Here is a new version of my game.
Nothing really new from the user point of view. Only some improvements in the code.
Download
Nothing really new from the user point of view. Only some improvements in the code.
Download
Last edited by Roland Chastain on Aug 24, 2017 6:20, edited 1 time in total.
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hello! Here Eschecs 0.9.5.
Now, when you click on a piece, the valid target squares are highlighted.
Happy new year!
Now, when you click on a piece, the valid target squares are highlighted.
Happy new year!
Last edited by Roland Chastain on Apr 21, 2018 16:47, edited 1 time in total.
Re: Eschecs
Can you add the ability to change the language and board size?
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hello! Thank you for your question. The language is selected at compilation time. Currently three languages are available (english, french, german). Please see BUILD.CMD to understand how to select a language. By the way, if someone would make another language file, I would be glad to include it.ur_naz wrote:Can you add the ability to change the language and board size?
About the board size, it's an interesting idea but it isn't a little modification. For the time being it isn't possible.
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hello! Here is Eschecs 0.9.6. Now includes a mate solver. It's a Pascal program by Valentin Albillo, that I converted to a dynamic library.
The user cannot use the mate solver: it's the computer that uses it. You can see in ESCHECS.LOG whether the computer has taken its move from the opening book, from the mate solver, or from the engine.
You can test separately the mate solver by using the code in MATESOLVER.BAS. Feel free to use the mate solver in your own program.
By the way, I would like someone to translate README.TXT in good English. :)
DOWNLOAD
The user cannot use the mate solver: it's the computer that uses it. You can see in ESCHECS.LOG whether the computer has taken its move from the opening book, from the mate solver, or from the engine.
You can test separately the mate solver by using the code in MATESOLVER.BAS. Feel free to use the mate solver in your own program.
By the way, I would like someone to translate README.TXT in good English. :)
DOWNLOAD
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Warlord Chess Pieces
Hello!
Here is a little piece of code I have just made. This is a draggable chess pieces demo (based on a code by BasicCoder2), with graphics from the chess program Warlord by William H. Rogers.
You can find the file colors.bi in Eschecs package or on this page.
Here is a little piece of code I have just made. This is a draggable chess pieces demo (based on a code by BasicCoder2), with graphics from the chess program Warlord by William H. Rogers.
You can find the file colors.bi in Eschecs package or on this page.
Code: Select all
#include "fbgfx.bi"
#include "colors.bi"
using fb
#define SCALE 48
screenres 8 * SCALE, 8 * SCALE, 32
windowtitle "Warlord Chessboard"
dim shared as integer board(7, 7)
dim shared as image ptr images(-6 to 7)
const BACKGROUND = 0
const DARKSQUARE = 7
const LIGHT = MEDIUMSLATEBLUE
const DARK = DARKSLATEBLUE
const SLASHFILL = true
dim as string datum
dim as integer x, y, i
for y = 7 to 0 step -1
for x = 0 to 7
read board(x, y)
next x
next y
for i = 0 to 5
for y = 0 to SCALE - 1
read datum
for x = 0 to SCALE - 1
select case mid(datum, x + 1, 1)
case "0"
pset(x + i * SCALE, y), MAGENTA
pset(x + i * SCALE, y + SCALE), MAGENTA
case "1"
pset(x + i * SCALE, y), GRAY
pset(x + i * SCALE, y + SCALE), GRAY
case "2"
pset(x + i * SCALE, y), WHITE
pset(x + i * SCALE, y + SCALE), BLACK
end select
next x
next y
next i
if SLASHFILL then
for x = 1 to 6 * SCALE - 2
for y = 1 to 2 * SCALE - 2
if point(x, y) = MAGENTA then
if (point(x, y - 1) = GRAY) _
or (point(x + 1, y - 1) = GRAY) _
or (point(x + 1, y ) = GRAY) _
or (point(x + 1, y + 1) = GRAY) _
or (point(x, y + 1) = GRAY) _
or (point(x - 1, y + 1) = GRAY) _
or (point(x - 1, y ) = GRAY) _
or (point(x - 1, y - 1) = GRAY) then
pset(x, y), LIGHT
end if
end if
next y
next x
end if
for x = 0 to SCALE - 1
for y = 0 to SCALE - 1
pset(x, y + 2 * SCALE), iif((x + y) mod 5 = 2, BLACK, MAGENTA)
next y
next x
for i = -6 to 7
images(i) = imagecreate(SCALE, SCALE)
next i
for i = 1 to 6
get ((i - 1) * SCALE, 0)-((i - 1) * SCALE + SCALE - 1, SCALE - 1), images(i)
next i
for i = -6 to -1
get ((-1 - i) * SCALE, SCALE)-((-1 - i) * SCALE + SCALE - 1, SCALE + SCALE - 1), images(i)
next i
if SLASHFILL then
get (0, 2 * SCALE)-(SCALE - 1, 3 * SCALE - 1), images(DARKSQUARE)
else
line images(DARKSQUARE), (0, 0)-(SCALE - 1, SCALE - 1), DARK, BF
end if
/'
const symbol = "prnbqk"
for i = 1 to 6
bsave "w" & mid(symbol, i, 1) & ".bmp", images(i)
bsave "b" & mid(symbol, i, 1) & ".bmp", images(-i)
next i
bsave "dark.bmp", images(DARKSQUARE)
'/
sleep
sub update()
screenlock()
line (0, 0)-(8 * SCALE - 1, 8 * SCALE - 1), LIGHT, bf
for y as integer = 0 to 7
for x as integer = 0 to 7
if (x + y) mod 2 = 0 then
put (x * SCALE, (7 - y) * SCALE), images(DARKSQUARE), trans
end if
if board(x, y) <> 0 then
put (x * SCALE, (7 - y) * SCALE), images(board(x, y)), trans
end if
next x
next y
screenunlock()
end sub
sub getmove()
dim as integer piece
dim as integer mx, my, btn, omx, omy
dim as integer x, y, ox, oy, dx, dy
getmouse mx, my,, btn
omx = mx
omy = my
if mx < 8 * SCALE and my < 8 * SCALE and btn = 1 then
x = mx \ SCALE
y = 7 - (my \ SCALE)
if SLASHFILL then
line images(BACKGROUND), (0, 0)-(SCALE - 1, SCALE - 1), LIGHT, BF
if (x + y) mod 2 = 0 then
put images(BACKGROUND), (0, 0), images(DARKSQUARE), (0, 0)-(SCALE - 1, SCALE - 1), TRANS
end if
else
line images(BACKGROUND), (0, 0)-(SCALE - 1, SCALE - 1), iif((x + y) mod 2 = 1, LIGHT, DARK), BF
end if
if board(x, y) <> 0 then
piece = board(x, y)
board(x, y) = 0
x = x * SCALE
y = (7 - y) * SCALE
ox = x
oy = y
while btn = 1
getmouse mx, my,, btn
dx = mx - omx
dy = my - omy
if (dx <> 0) _
or (dy <> 0) then
x = x + dx
y = y + dy
if x < 0 then
x = 0
elseif x > 7 * SCALE then
x = 7 * SCALE
elseif y < 0 then
y = 0
elseif y > 7 * SCALE then
y = 7 * SCALE
end if
put (ox, oy), images(0), PSET
get (x, y)-(x + SCALE - 1, y + SCALE - 1), images(BACKGROUND)
put (x, y), images(piece), TRANS
omx = mx
omy = my
ox = x
oy = y
end if
wend
x = mx \ SCALE
y = 7 - (my \ SCALE)
board(x, y) = piece
update()
end if
end if
end sub
dim key as string
update()
do
getmove()
key = inkey
loop until (key = chr(255) & "k") or (key = chr(27))
data -2,-3,-4,-5,-6,-4,-3,-2
data -1,-1,-1,-1,-1,-1,-1,-1
data 0, 0, 0, 0, 0, 0, 0, 0
data 0, 0, 0, 0, 0, 0, 0, 0
data 0, 0, 0, 0, 0, 0, 0, 0
data 0, 0, 0, 0, 0, 0, 0, 0
data 1, 1, 1, 1, 1, 1, 1, 1
data 2, 3, 4, 5, 6, 4, 3, 2
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000011111111000000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222222122100000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000000122222222100000000000000000000"
data "000000000000000001222222222210000000000000000000"
data "000000000000000012222222222221000000000000000000"
data "000000000000000122222222221222100000000000000000"
data "000000000000001222222222222122210000000000000000"
data "000000000000012222222222222212221000000000000000"
data "000000000000122222222222222221222100000000000000"
data "000000000001222222222222222222122210000000000000"
data "000000000012222222222222222222212221000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001221111111111111111111111112221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001222222222222222222222222222221000000000"
data "000000001111111111111111111111111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000111111110011111111001111111100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222210012222221001222222100000000000"
data "000000000122222211112222221111222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000122222222222222222222222222100000000000"
data "000000000111121111111111111111112111100000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122100000122222222222100000000000000"
data "000000000000122111111122222222222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221000001222100000000000000"
data "000000000000122222222221111111222100000000000000"
data "000000000000122222222222222222222100000000000000"
data "000000000000121111111111111111112100000000000000"
data "000000000011222222222222222222222211000000000000"
data "000000000122222222222222222222222222100000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001222222222222222222222222222210000000000"
data "000000001111111111111111111111111111110000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000010000000000000000"
data "000000000000000000000000000000121000000000000000"
data "000000000000000000000000000001222100000000000000"
data "000000000000000000000000000012222100000000000000"
data "000000000000000000000000000122222100000000000000"
data "000000000000000000000000001222222100000000000000"
data "000000000000000000000011111222221210000000000000"
data "000000000000000000011122221222221221000000000000"
data "000000000000000000122222222222222221000000000000"
data "000000000000000001221112222222222222100000000000"
data "000000000000000012211122222222222222100000000000"
data "000000000000001122222222222222222212210000000000"
data "000000000000112222222222222222222221221000000000"
data "000000000001222222222222222222222222122100000000"
data "000000001112222222222222222222222212212100000000"
data "000000012222222222222222221222222221221100000000"
data "000000012222222222222222221222222222122100000000"
data "000000012222222222222222212222222212212100000000"
data "000000011222211111111111122222222221221100000000"
data "000000000111100000012221222222222222122100000000"
data "000000000000000000012221222222222212212100000000"
data "000000000000000000012221222222222221221100000000"
data "000000000000000000012221222222222222122100000000"
data "000000000000000000012221222222222222212100000000"
data "000000000000000000012221222222222222221000000000"
data "000000000000000000122212222222222222210000000000"
data "000000000000000011222122222222222222210000000000"
data "000000000000001122222222222222222222210000000000"
data "000000000000112222222222222222222222221000000000"
data "000000000011221111111111111111111111122110000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001222222222222222222222222222222210000000"
data "000000001111111111111111111111111111111110000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000011111000000000000000000000"
data "000000000000000000000122222100000000000000000000"
data "000000000000000000001222222210000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000012222221112222221000000000000000"
data "000000000000000122222221012222222100000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222100000000000122222100000000000"
data "000000000000122222111111011111122222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000122222222221012222222222100000000000"
data "000000000000012222222221012222222221000000000000"
data "000000000000001222222221012222222210000000000000"
data "000000000000000122222221112222222100000000000000"
data "000000000000000012222222222222221000000000000000"
data "000000000000000001222222222222210000000000000000"
data "000000000000000000122222222222100000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000000000000012222222221000000000000000000"
data "000000000000000000012111111121000000000000000000"
data "000000000100000000122222222222100000000100000000"
data "000000001210000001222222222222210000001210000000"
data "000000001221111112222111111122221111112210000000"
data "000000001222222222221000000012222222222210000000"
data "000000000122222222210000000001222222222100000000"
data "000000000011111111100000000000111111111000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000110000000000000000000000"
data "000000000000000000000001221000000000000000000000"
data "000000000000000000000012222100000000000000000000"
data "000000000000000000000122112210000000000000000000"
data "000000000000000010001221001221000100000000000000"
data "000000000000000121001222112221001210000000000000"
data "000000000000001222100122222210012221000000000000"
data "000000000000012212210012222100122122100000000000"
data "000000000000122101221001221001221012210000000000"
data "000000000000012212210001221000122122100000000000"
data "000000000100001222100001221000012221000010000000"
data "000000001210000122100001221000012210000121000000"
data "000000012221000012210001221000122100001222100000"
data "000000122122100001221001221001221000012212210000"
data "000000122112210001222101221012221000122112210000"
data "000000012222100000122211221122210000012222100000"
data "000000001221000000122221221222210000001221000000"
data "000000000122100000012222222222100000012210000000"
data "000000000012211000012222222222100001122100000000"
data "000000000001222110001222222221000112221000000000"
data "000000000000122221101222222221011222210000000000"
data "000000000000012222211222222221122222100000000000"
data "000000000000001222222222222222222221000000000000"
data "000000000000000122222222112222222210000000000000"
data "000000000000000012222221001222222100000000000000"
data "000000000000000001222210000122221000000000000000"
data "000000000000000000122221001222210000000000000000"
data "000000000000000000012222112222100000000000000000"
data "000000000000000011122222222222211100000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000000000122222222222222222210000000000000"
data "000000000001111122111111111111112211111000000000"
data "000000000012222222222222222222222222222100000000"
data "000000000122222222222222222222222222222210000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001222222222222222222222222222222221000000"
data "000000001111111111111111111111111111111111000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000001100000000000000000000000"
data "000000000000000000000012210000000000000000000000"
data "000000000000000000000122221000000000000000000000"
data "000000000000000000001221122100000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000000000012210012210000000000000000000"
data "000000000000111111001221122100111111000000000000"
data "000000000001222222100122221001222222100000000000"
data "000000000012211112210122221012211112210000000000"
data "000000000122122221221122221122122221221000000000"
data "000000001221222222122222222221222222122100000000"
data "000000012212222222212222222212222222212210000000"
data "000000122122211211221222222122112112221221000000"
data "000000121222210101222122221222101012222121000000"
data "000000121222221012222222222222210122222121000000"
data "000000121222210101222222222222101012222121000000"
data "000000122122211211222222222222112112221221000000"
data "000000012212222222222222122222222222212210000000"
data "000000001221222222222221012222222222122100000000"
data "000000000122122222222210001222222221221000000000"
data "000000000012212222222100000122222212210000000000"
data "000000000001221222222210001222222122100000000000"
data "000000000000122122222221012222221221000000000000"
data "000000000000012212222222122222212210000000000000"
data "000000000000001221222222222222122100000000000000"
data "000000000000000122122222222221221000000000000000"
data "000000000000000012212222222212210000000000000000"
data "000000000000000111222222222222111000000000000000"
data "000000000000001222222222222222222100000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000000012222222222222222222210000000000000"
data "000000000001112211111111111111112211100000000000"
data "000000000012222222222222222222222222210000000000"
data "000000000122222222222222222222222222221000000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001222222222222222222222222222222100000000"
data "000000001111111111111111111111111111111100000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
data "000000000000000000000000000000000000000000000000"
Last edited by Roland Chastain on Mar 31, 2018 13:49, edited 1 time in total.
-
- Posts: 3906
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Eschecs
Hi Roland,
There is a little bug somewhere which appears to be only on the left and right columns.
Sometimes when you move a piece the back color is smeared along with it?
Holding the mouse down on the color rather than the piece may be the problem?
There is a little bug somewhere which appears to be only on the left and right columns.
Sometimes when you move a piece the back color is smeared along with it?
Holding the mouse down on the color rather than the piece may be the problem?
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Hi John!
Thank you for reporting that bug.
Here is a quick solution:
Thank you for reporting that bug.
Here is a quick solution:
Code: Select all
x = x + dx
y = y + dy
' add this
if x < 0 then
x = 0
elseif x > 7 * SCALE then
x = 7 * SCALE
elseif y < 0 then
y = 0
elseif y > 7 * SCALE then
y = 7 * SCALE
end if
-
- Posts: 1004
- Joined: Nov 24, 2011 19:49
- Location: France
- Contact:
Re: Eschecs
Slightly retouched the code and edited my previous post.
Here is how the chessboard looks now.
One still can get a two colored chessboard by setting the SLASHFILL constant to false.
Here is how the chessboard looks now.
One still can get a two colored chessboard by setting the SLASHFILL constant to false.
Re: Eschecs
Yo Roland, nice work! The AI is, however, very naive I'm afraid. I beat it in about 12 moves =DRoland Chastain wrote:Slightly retouched the code and edited my previous post.
Can I make a suggestion? Implement movement recording, so you can reproduce the game later; for studying, share games with others, and of course aid in debugging. Not to mention the ability to load and save chess problems and the solutions (which are pretty interesting if you like chess). This will also allow you to implement undo features, if you so desire.
All in all, excellent little chess program. Love the minimalistic look. Keep it up!