You are not logged in.
Hello, i am working on my own project - ChessGame.
I am looking for the way to makes pawns movable with directions ;d
I am thinking about Void, and makes groups like Queen / King / Pawn etc and there code their movements
Any ideas how it should looks like?
I am using C++ Builder.
I am here :
Its looks like:
https://imgur.com/v9LoPr8
Thinking about this, but maybe i am wrong
void __fastcall TForm1::pionblack1MouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
}
//---------------------------------------------------------------------------
Regards,
Gugi
Last edited by Gugi (2019-05-22 05:37:56)
- I am using Arch BTW
Offline
Does this question actually have anything to do with chess, or is your question simply how to enable drag-and-drop for a widget in whatever toolkit you are using?
If the latter, google for that, and the answers should be readily found.
If the former, I think you're really putting the cart before the horse. Plan your data structures. How will board positions be represented, and how are 'moves' represented in your data.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
single one part of board named in example: A1, A2... A8 ... H1 to H8 .
thinking about class pawn / bishock / queen / king / tower etc and makes them public, so i dont have to code single pawn in game, just let them acces to class with configured ways of moving ;D
- I am using Arch BTW
Offline
And how exactly do you represent "This particular pawn is currently on C5"? Is there some "board" object that contains a list of pieces (and their individual positions)? Or does each piece manage its own position on the board?
Offline
And how exactly do you represent "This particular pawn is currently on C5"? Is there some "board" object that contains a list of pieces (and their individual positions)? Or does each piece manage its own position on the board?
Every single piece of board got single position, still thinking if it will help or makes things harder..?
- I am using Arch BTW
Offline
Every single piece of board got single position, still thinking if it will help or makes things harder..?
Well… yeah, that's a requirement for playing Chess (you can't have two pieces on the same field).
But how do you represent that in your code? Which data structure (or "class", as you seem to want to do this in an object-oriented language) holds what information?
Offline
Actually i dont, i am looking for.
- I am using Arch BTW
Offline