This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

imacat
imacat presents ...

2012/6/7

Snake 貪食蛇

A simple game for learning programming. This game demostrates how to use a Linked List.

Hit up, down, left and right to steer the snake.

程式寫作教學用的小遊戲,示範如何使用Linked List。

按上、下、左、右鍵操控貪食蛇。

3690 views / 711 in the last 7 days

Tags: game with-source

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Fri Jun 08 03:01:02 UTC 2012 * 改了沙地和青蛙的圖,比較美觀。 * 加上比較完整的註解。 * Direction的isOpposite方法改為物件方法,減少新觀念,也比較簡單。
A new version of this scenario was uploaded on Fri Jun 08 03:30:22 UTC 2012 * isOpposite方法改名為isOppositeTo。
A new version of this scenario was uploaded on Tue Jul 08 15:41:58 UTC 2014 * Changed the size of the world to that of the Nokia snake game. * Changed the position of the first food to that of the Nokia snake game. * Changed the size and the position of the snake initially to that of the Nokia snake game. * Changed the icon of the food to that of the Nokia snake game. * Redraw the snake bodies each round so that they do not occupy the full cells and they connects to their preceder and follower, so that it is easier to tell where the snake bodies go when they are crowded. * Changed the background so that it does not show the cells, as the Nokia snake game. * Changed the snake head so that it is easier to tell its direction. * Changed the snake tail so that it is more stylish. * Changed the snake graphic so that it looks simplier and stylish. * Changed the body collision rule so that the snake head does not collide to the snake tail when the snake tail will move away in this round. * Added a score board. * Changed the game over rule so that the game stops when the world is full. * 場景大小改為 Nokia 手機貪食蛇遊戲的大小。 * 第一塊食物改放在 Nokia 手機貪食蛇遊戲的位置。 * 蛇一開始的位置和長度,改依 Nokia 手機貪食蛇遊戲裏一開始的位置和長度。 * 食物的圖像改為 Nokia 手機版貪食蛇遊戲的食物圖像。 * 每個回合重劃一次每一塊蛇身,不要佔滿整格,並且和前後節蛇身連在一起,在蛇身擠在一起時,才看得出蛇身的走向。 * 刪除場景背景,像 Nokia 手機版貪食蛇遊戲一樣,看不到格子。 * 修改蛇頭,以便看出蛇頭的方向。 * 修改蛇尾,比較好看。 * 修改遊戲的圖片,比較簡約好看。 * 修正身體碰撞規則,蛇尾會移開時,蛇頭不會撞上蛇尾。 * 加上計分板。 * 修改遊戲結束的規則,蛇身全滿時,遊戲也會結束。

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.