Git Product home page Git Product logo

tetriz's Introduction

Tetriz

项目来源:【手把手教你写俄罗斯方块:6-俄罗斯方块的表示和旋转】

只更新到了第六个视频

控制台字符

参考来源

相关控制

16色

256色

关于俄罗斯方块

Tetromino

旋转系统

SRS

tc 命名空间函数

void move_to(int row,int col); 移动到某行某列

void set_fore_color(int id); 设置前景色

void set_back_color(int id); 设置背景色

void clean_screen(); 清空屏幕

void reset_color(); 重置颜色

void hide_cursor(); 隐藏指针

void show_cursor(); 显示指针

utils 命名空间

int fps(); 返回刷新次数

inline int b2c(int bindex); 两列为一个坐标

draw 命名空间

void window(int x,int y,int width,int height,std::string title); 在x,y(两个内容算一个y像素)处画一个width宽,height高的窗口

game 命名空间

void window(int x,int y,int width,int height,std::string title); 在x,y(两个内容算一个y像素)处画一个width宽,height高的窗口

int row(); 返回行数

int col(); 返回列数

char getch(); 无缓冲,无回显返回读取的字符串

void key_event(); 处理键盘事件

bool is_running(); 返回运行状态

void start_key_listener(); 开始键盘监听

void init(); 初始化

void command_quit(); 退出函数

void command_rotate(); 旋转函数

void command_left(); 左移函数

void command_right(); 右移函数

void command_down(); 下降函数

mino 命名空间

Tetromino I,J,L,O,S,T,Z; 定义方块

Tetromino rotate(Tetromino& t); 旋转操作

tetriz's People

Contributors

lnpbqc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.