- Rust Programming By Example
- Guillaume Gomez Antoni Boucher
- 150字
- 2021-07-02 19:13:08
Writing Tetris
First, let's review the Tetris rules (just in case):
- There is a grid with a height of 16 blocks and a width of 10 blocks.
- You have seven different tetrimino (a tetris piece) that are all composed of four blocks.
- A new tetrimino appears at the top of the game's grid every time the previous one cannot descend any more (because the block below is already occupied or because you've reached the game's floor).
- The game is over when a new tetrimino cannot appear anymore (because there is already a tetrimino at the top of the grid).
- Every time a line is full (all blocks are occupied by a tetrimino part), it disappears and all lines above descend by one line.
Now that we all agree on the game rules, let's see how to actually write those mechanisms.
First, we need to actually create those tetriminos.
推薦閱讀
- 面向青少年的博物館教育(上下卷)
- 中國人民大學(xué)復(fù)印報(bào)刊資料轉(zhuǎn)載指數(shù)排名研究報(bào)告2016
- 從私藏到公共展覽:民國時(shí)期廣州的博物館和展覽會
- 中國古代戲曲目錄研究
- 圖書館服務(wù)思維研究
- 圖書館知識整合與知識服務(wù)研究:以西部社會科學(xué)院圖書館為例
- 非物質(zhì)文化遺產(chǎn)數(shù)字化研究
- Mobile Artificial Intelligence Projects
- 大數(shù)據(jù)環(huán)境下高校圖書館知識服務(wù)模式研究
- 博物館與文化浙江建設(shè):浙江省博物館學(xué)會2017年學(xué)術(shù)研討會論文集
- 圖書館服務(wù)管理內(nèi)化:概念、過程及整合因素
- 圖書館服務(wù)均等化與資源共享(上冊)
- 信息檢索
- 李一氓文存(套裝全五冊)
- 圖書館服務(wù)均等化與資源共享(下冊)