C

C语言实现贪吃蛇源码

赵裕(vimerzhao)
先放效果 源代码 //2016-2-12 //zhaoyu //Gmail:zhaoyu1995.com@gmail.com //Language: C //Platform:Code::Blocks #include <stdio.h> #include <windows.h> #include <stdlib.h> #include <time.h> typedef struct snake { int x; int y; struct snake *next; }Snake; int X, Y; enum STATUS{Up = 1, Down, Left, Right}; Snake *pHead, *pBody;//the head of the snake enum STATUS Direction; int score=0, scorePerFood=10; int gameStatus = 0; int timeInterval = 200; void gameEnd(void); void setPosition(int x, int y) { COORD pos; HANDLE hOutput; pos.X = x; pos.Y = y; hOutput = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(hOutput, pos); } void hideCursor() { CONSOLE_CURSOR_INFO cursor_info = { 1, 0 }; SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);

C语言 实现小世界网络

赵裕(vimerzhao)
write by ai 原文:CSDN 链接 `n## 1简介: 小世界网络最早由Watts和Strogtz在1998年提出,小世界网络存在于数学、物理学和社会学中,是一种数学图的模型。在这种图中大部份的结点不与彼此邻接,但大部份结

C语言 验证无标度网络的幂律定律

赵裕(vimerzhao)
write by ai 原文:CSDN 链接 `n1复杂网络发展史 几乎每个人都听说过大数学家欧拉和哥尼斯堡七桥的故事,而1736年29岁的欧拉向圣彼得堡科学院递交了《哥尼斯堡的七座桥》的论文,也正式标志着数学的一个新的分支