#include <stdio.h> #include <windows.h> #include <stdlib.h> #define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0) #define KEYUP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1) int map[4][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,0,15}}; int ifHold[4]={0,0,0,0}; int onTap(vk_code){ if(ifHold[vk_code-37]==0&&KEYDOWN(vk_code)){ ifHold[vk_code-37]=1; return 1; } else if(ifHold[vk_code-37]==1&&KEYUP(vk_code)){ ifHold[vk_code-37]=0; return 0; } else{ return 0; } } int showMap(){ int i,j; for(i=0;i<4;i++){ for(j=0;j<4;j++){ p