- 論壇徽章:
- 0
|
剛從文件夾中翻出以前寫的一個(gè)俄羅斯方塊程序。創(chuàng)建時(shí)間居然是2007年12月,想想已經(jīng)學(xué)習(xí)
Python+Pygtk有兩年時(shí)間。當(dāng)時(shí)為了學(xué)習(xí)python,就把gtktetris用pygtk重寫了一次。
完成了基本的游戲功能。個(gè)人感覺學(xué)習(xí)新語言最快的方法就是 用新語言重寫其他語言的代碼。
需要說明的是:
1。 解壓進(jìn)到myblock目錄后, 運(yùn)行'python myblock.py'
2。 上下左右建分別是"WSAD", 也就是W鍵表示旋轉(zhuǎn)(逆時(shí)針方向的)。
3。 S鍵表示向下,加速方塊降落。 blank鍵也有同樣的效果
4。 有簡(jiǎn)單的積分功能
開始HAPPY游戲吧!
===========================================
Just now I pick up a Tertis game in my Nautilus. It's written in Pygtk
two year ago. In that time, I re-write gtktetris using Python + Pygtk,
just for studying python.
Game Howto Notes:
1. untar myblock.tar.gz and cd myblock directory
2. run 'python myblock.py' to play game
3. choose 'start new game', 'w; means 'up', 'w' or 'blank'means DOWN
'a' meas LEFT 'd' means RIGHT
Go to game and have fun.
gtktetris Project HomePage:
http://sourceforge.net/projects/gtktetris/
http://www.gnomefiles.org/app.php/gtktetris
![]()
![]()
文件:myblock.tar.gz
大小:16KB
下載:
下載
本文來自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u2/68938/showart_2116797.html |
|