随笔分类 - 小游戏
摘要:vim game_2048.c,按下i进入编辑模式,然后将上面的代码复制进去,再按Esc退出编辑模式,按下:x保存并退出。 然后在终端运行:gcc game_2048.c -o 2048 -lcurses 进行编译,最后输入./2048即可运行2048。方向键是wasd。 效果截图:
阅读全文
摘要:1 #include <stdio.h> 2 #include <stdlib.h> 3 4 #define N 15 5 6 int chessboard[N + 1][N + 1] = { 0 }; 7 8 int whoseTurn = 0; 9 10 void initGame(void);
阅读全文
摘要:1 <!doctype html> 2 <html> 3 4 <head> 5 <meta charset="utf-8"> 6 <title>Baymax</title> 7 8 <style> 9 body { 10 background: #595959; 11 } 12 13 #baymax
阅读全文
摘要:1 #-*- coding:utf-8 -*- 2 3 import curses 4 from random import randrange, choice # generate and place new tile 5 from collections import defaultdict 6
阅读全文
摘要:1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 5 using namespace std; 6 7 char g[90]; 8 9 bool isPlace(int n) 10 { 11 for (int i =
阅读全文
摘要:技术: -HTML -CSS -Javascript -JQuery 下面是代码内容 index.html 2048.css main2048.js showanimation2048.js support2048.js jquery.min.js(来自http://libs.baidu.com/j
阅读全文
摘要:想要换背景颜色和字符颜色吗?想让按下非方向键,蛇不会死掉?想要解决屏幕一闪一闪的问题吗?转到C++控制台应用程序之贪吃蛇(改进版)
阅读全文