MFC implementation 2048 Games (i)

Source: Internet
Author: User

MFC implements 2048 games first:

There are a total of two scenes, welcome scenes and game scenes, under MFC, a scene is a dialog box:

The first step:

Implementing the Welcome Scenario:

Very simple Insert a dialog box: Prevent two buttons, one to enter the game, one to exit the game, the other interface on the other screen can load the picture looks a little;

This class is: Cstartdlg

Because we run the program first out of the welcome interface, so in the 2048App to change the main dialog box to Cstartdlg

Step two: Implement the game scene:

Here the interface is almost not set, the interface part does not send time to get, is a simple array of digital display, mainly to make the game logic, the next chapter talking about the logic of the game!

MFC implementation 2048 Games (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.