03 2016 档案

摘要:vim game_2048.c,按下i进入编辑模式,然后将上面的代码复制进去,再按Esc退出编辑模式,按下:x保存并退出。 然后在终端运行:gcc game_2048.c -o 2048 -lcurses 进行编译,最后输入./2048即可运行2048。方向键是wasd。 效果截图: 阅读全文
posted @ 2016-03-26 00:05 叶建成 阅读(1234) 评论(0) 推荐(0)
摘要: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); 阅读全文
posted @ 2016-03-25 23:08 叶建成 阅读(586) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2016-03-25 20:43 叶建成 阅读(984) 评论(1) 推荐(1)
摘要: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 阅读全文
posted @ 2016-03-25 20:09 叶建成 阅读(950) 评论(0) 推荐(0)