Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi as an amateur programer i want to write a simple Chess game using buttons as marbles . but i have a problem in indicating the exact location of the marbles. This would be possible only if every button have an individual X and Y ! but i don't know how to do this? i know that i must use 2D arrays but i don't know how? please answer simple enough to be understand by an amateur programmer(i know about how to define arrays ,method and .... ).

thank you for your help
Posted
Comments
Sergey Alexandrovich Kryukov 13-Dec-11 14:16pm    
With array of buttons, your chess game would be really ugly...
Do you want to make just the front-end to an available engine, or you have your own engines? Why would you do either of those, I wonder? -- there are many available developments.
--SA
Mohammad Mahdi Nejati 13-Dec-11 22:56pm    
i know what you say but i am doing this because i don't know any other control for doing this if there is any please let me know. i don't you use any engine i want to make 2 player chess game not against computer.

Go through the following links:

Chess Program in C#
Chess Game Starer Kit
Chess in C#
 
Share this answer
 
Over 3.6 million google search results for the phrase "c# define multi-dimensional arrays"[^]

Moving the marbles around is totally depenedent on how you architechted the board object and the chesspiece object. In other words, does the board know where the pieces are, or do the pieces themselves know where they are? Once you determine that, the rest should be easy to do.
 
Share this answer
 
Comments
Mohammad Mahdi Nejati 13-Dec-11 22:58pm    
you are right and thats EXCATLY my problem . i don't know how to do this.please explain how a little more.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900