How do you draw a backgammon board with MFC?

Updated on Game 2024-03-03
13 answers
  1. Anonymous users2024-02-06

    This has backgammon source code. In addition, you can chat online for details.

  2. Anonymous users2024-02-05

    Follow the instructions.

    Draw grids one by one.

    Arrange them neatly.

  3. Anonymous users2024-02-04

    Simple, draw a lattice. Hahaha.

  4. Anonymous users2024-02-03

    Send me a mailbox and I'll send you a complete program.

  5. Anonymous users2024-02-02

    First draw the grid with a brush, the distance between the grids should be determined, the circular area of each intersection point should be determined, after drawing the grid, calculate how many intersections, define how many areas, the location of the area has the grid intersection point, the distance between the intersection points and the radius of the area are determined, and then scan in the Zuo Jian message to determine which area the left mouse button falls on, and then display five subfigures in which area, and then judge the horizontal and longitudinal oblique eight directions to push out five points to see if there are five continuous, During this period, the left mouse button message should be blocked, and the message should be received after the judgment is over, and the message can be marked in the message processing.

  6. Anonymous users2024-02-01

    Find the best resources for chessboards and chess pieces on the Internet, and present the chessboard and chess pieces in the form of stickers.

  7. Anonymous users2024-01-31

    This needs to create a form by yourself, the session box that comes with the win api does not support this function, the method is very complicated, you can make a dll, dll with win api to draw a window.

  8. Anonymous users2024-01-30

    Partially implement the function, I don't know if it's suitable.

    public void mouseclicked(mouseevent e)

    else;judge();

  9. Anonymous users2024-01-29

    You can give a coordinate in the next function and he will display a chess piece bitmap, since the x and y coordinates of each chess piece are different by a fixed value, you can position each position to display a chess piece.

  10. Anonymous users2024-01-28

    Hello, can you give me a reference for your documents?

  11. Anonymous users2024-01-27

    If it doesn't involve man-machine combat, then it's easier.

    Here's the idea.

    Logic: There is a 10*10 array to represent the pieces on the board, 0 for no pieces, 1 for white, and 2 for black. Each new piece is added to determine whether the piece can be placed in the current position, and then iterates through all the pieces to see if there are 5 connected pieces in various directions.

    Judging 5 pieces in a row: It is nothing more than taking a chess piece as a starting point, calculating the coordinates in all directions, and then comparing whether the pieces on the corresponding coordinates are the same, and whether the number reaches 5, and when it is reached, the true color chess wins.

    Interface Section: Draw pieces on the interface based on an array of 10*10. The mouse click is to determine whether the position is on the checkerboard grid or not.

    Then, through the data in the array, determine whether the square can be played or not. Then redraw the board update section.

  12. Anonymous users2024-01-26

    The black and white flag does not need to be drawn with **, find the bmp** of 2 chess pieces, and then directly map it.

    The squares of the chessboard need to be controlled to draw lines, mainly the algorithm of connecting the five pieces of the chess pieces, and I have done similar homework before.

  13. Anonymous users2024-01-25

    What about your ondraw function?

    The background is automatically redrawn, and no one will draw your chess pieces for you, so do it yourself.

Related questions
11 answers2024-03-03

Drop out the following line and try it:

#include "res\" // non-microsoft visual c++ edited resources >>>More

7 answers2024-03-03

For this, first of all, you have to be able to use macros, otherwise you have to be able to write VBA. >>>More

4 answers2024-03-03

Passing the CFA in one month is a bit difficult and requires a solid economic foundation. >>>More

3 answers2024-03-03

1. Why do we need to do knowledge paraphrasing?

2. The mental method of knowledge paraphrasing. >>>More

17 answers2024-03-03

Girls generally prefer men who are older than themselves.