Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey guy...Im beginner..i decide to design a chess game and i need to design a chess board.i wrote a chess in c++ but i don t know how to design a graphical board can running my c++ chess source code ..actually i need source code to design a chess board can run with my chess source.
this is my gmail:[DELETED]@gmail.com
i happy known your idea about my problem guy.
thank you do much

[edit]Email removed - OriginalGriff[/edit]

What I have tried:

design a chess board can running my chess c++ game
Posted
Updated 18-Mar-16 0:35am
v2
Comments
OriginalGriff 18-Mar-16 6:04am    
Never post your email address in any forum, unless you really like spam! If anyone replies to you, you will receive an email to let you know.

1 solution

For a 2D chess game you may use the Graphics View Framework | Qt Widgets 5.6[^].

The chess board can be then drawn on the background layer of the QGraphicsScene Class | Qt Widgets 5.6[^]. Designing the board should be no problem. Just draw the 64 rectangles filled with alternating colours.

The pieces can be implemented using the QGraphicsItem Class | Qt Widgets 5.6[^] when drawn by code. If the pieces has been created as bitmap images, use the QGraphicsPixmapItem Class | Qt Widgets 5.6[^].

The latter option should be the simpler one. You might search the web for existing chess pieces (but be aware of image copyrights if you want to publish your program).
 
Share this answer
 

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