hey can u help me make a back, resign and draw for my chess app i used your chess board thanks a lot
I made this topic public, because I post for every one to learn (including me.)
The last work I did on chess is at
If you haven't read that post, now is a good time to do so.
Especially the part about storing the game as a list of FEN (Forsythe Edwards Notation) board states in a CloudDB list.
The current board is always at the end of that list.
New move results are added to the end of the list.
To undo a move, copy the next to last item from the list and add it to the end of the list.
Then update the display from the new current board at the end of the list.
I don't remember having settled on a move notation for individual moves. There are a bunch of them.
I lost interest in this app 2 1/2 years ago.
P.S. Here is the abandoned incomplete next version of that app, in case there are parts you can use ...
chess_board_buttons_V1.aia (24.8 KB)
As a side note, even if not relevant here.
Channon number: 30^80 ≈ 10^120 → possible chess (move) variants
A modern supercomputer would need 10^90 years to calculate the complete game tree in chess. 1 billion times the time since the Big Bang would not be enough.
So there will never be a computer (not even a quantum computer or any Artificial Intelligence - AI) that reliably beats a human being / chess grandmaster.
i cant seem to make the board reset
That's the hardest thing to debug ...
For a general question, here is a general answer.
Go through all the things that have an initial state in the app, and code a procedure to set those initial values again.
Call the procedure Reset, and call it from your Reset button.
Things to reset...
- Variable values
- Component attributes
- Database tags and values
can you make my blocks code text to blocks code?
(Canned Reply ABG - Public Only)
I do not provide private support.
You will get more informed and quicker worldwide support by asking in a new public thread.
Making this thread public.
What blocks code text?
can u make this to a blocks code?
if u can pls send me an aia file thanks
set deltaY to ImageSprite.Y - initialY
// Implement the pawn movement rules if (deltaY = 1 or deltaY = -1) or (deltaY = 2 and initialY = 1) // Move one or two spaces forward (up or down, depending on the pawn's color) set ImageSprite.Y to ImageSprite.Y + deltaY * (height of ImageSprite) else if (deltaY = 1 or deltaY = -1) and (math: abs(ImageSprite.X - initialX) = 1) // Capture diagonally set ImageSprite.X to ImageSprite.X + (ImageSprite.X - initialX) set ImageSprite.Y to ImageSprite.Y + deltaY * (height of ImageSprite) set isPawnSelected to False
You already havd the pseudo-code, why not make the blocks by your self?
i dont know whre the deltaY X and IniatialX Y is located
It looks like a variable, you need
initialize globle deltaY to 0
anyway, where did you get this pseudo-code? you need to ask the author directly.
Where did you find this code?
i got it from a facebook post