关灯游戏,谁有简单的代码啊
摘要:
int light[4][4] = { {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1} }; int x = 0, y = 0, sum = 0; for (int i = 0; i 4 || y > 4 || x 0 && x 0 && y < 3) { light[x][y - 1] = (light[x][y - 1] + 1) % 2; light[x][y + 1] = (light[x][y + 1... 阅读全文
posted @ 2014-04-12 21:44 Azazqiang 阅读(307) 评论(0) 推荐(0) 编辑