linux如何实现2048小游戏
时间:2023-05-22 02:08
复制代码 代码如下: 复制代码 代码如下:#include"2048.h"int main(){ start_game(); return 0;}2048.h
#ifndef _2048_h_#define _2048_h_#include<stdio.h>#include<stdlib.h>#include<string.h>#include<termios.h>//#include<unstd.h>//#include<time/sys.h>#define line 21#define row 22#define arr_l 4#define arr_r 4#define num_color 32#define back 49#define bold 31static int line_location=0;static int row_location=0;static int arr[4][4]={0};static char tmp[5]="