main.cpp
#include"Head.h"
#include"Draw.h"
#include"Init.h"
#include"game.h"
int main()
{
initgraph(WINDOW_WIDTH,WINDOW_HIGH);
DrawGameWindow();
//使用 API 函数修改窗口名称
HWND hWnd = GetHWnd();
SetWindowText(hWnd, _T("俄罗斯方块"));
InitGame();
PlayGame();
getchar();
closegraph();
system("pause");
return 0;
}
配置文件:RockShape.ini
@###
@###
@@##
####
@@@#
@###
####
####
@@##
#@##
#@##
####
##@#
@@@#
####
####
****
#@##
#@##
@@##
####
@###
@@@#
####
####
@@##
@###
@###
####
@@@#
##@#
####
####
****
#@##
@@@#
####
####
@###
@@##
@###
####
@@@#
#@##
####
####
#@##
@@##
#@##
####
****
#@##
@@##
@###
####
@@##
#@@#
####
####
****
@###
@@##
#@##
####
#@@#
@@##
####
####
****
@###
@###
@###
@###
@@@@
####
####
####
****
@@##
@@##
####
####
****
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持ASPKU。
注:相关教程知识阅读请移步到C++教程频道。










