Skip to content
Tetris WinAPI Win32 C/C++
C++ C Objective-C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Source Code
TetrisGame_zjy
.gitignore
README.md
TetrisGame_zjy.sln
demo.png

README.md

tetris-game

Tetris WinAPI Win32 C/C++

Win32程序,使用WinAPI,主要代码在 TetrisGame_zjy.cppShapes.h 中。

形状存储

使用二维数组存储七种形状,遍历填充,通过矩阵的旋转算法进行变换。

static int shapes[7][4][4] = {
  {
      { 0, 0, 0, 0 },
      ( 0, 1, 0, 0 },
      { 1, 1, 1, 0 },
      { 0, 0, 0, 0 },
  },
  
  ......

}

demo展示

demo

You can’t perform that action at this time.