IBM Supervessel Power Cloud Platform Tetris Game Chapter

Source: Internet
Author: User

Disclaimer: This document is only used for learning and communication purposes and should not be used for any other commercial purpose
Author: Chaoyang _tony
e-mail: [Email protected]
Create date:2015-3-8 17:01:37 Sunday
Last change:2015-3-8 18:02:02 Sunday
Reprint Please specify source: Http://blog.csdn.net/linzhaolover

Summary:
俄罗斯方块,想起小时候,花10块钱,去小卖部买了个手持电子游戏机,白天玩,晚上玩,上厕所都带着,就跟现在玩手机差不多,后来学习了电脑,在linux系统下用c语言自己写了一个,linux平台下终端版,O(∩_∩)O~ ,今天就在power云平台上玩玩,

IBM Supervessel Power Cloud Platform https://ptopenlab.com/cloudlab/index.html

Download Tetris C source code

I put the source code in the CSDN, convenient for everyone to download

Install Git
sudo apt-get--versionversion1.9.1
Download source code
git clone https://code.csdn.net/linzhaolove/tetris.git
Compile run
opuser@gto:~$ cd tetris/opuser@gto:~/tetris$ lsmain.c  Makefile  manual.txt  README.md  tony_tetris.c  tony_tetris.hopuser@gto:~/tetris$ makecc -g    -c -o main.o main.ccc -g    -c -o tony_tetris.o tony_tetris.cgcc -o main main.o tony_tetris.o
User manual
操作说明左移:   a 左方向键右移:   d 右方向键下降:   s 下方向键     x  是直接降到最后变型:   w  空格键    向上方向键开始:   b暂停/继续:     p退出:   q帮助:   h向上:   u//这个键向上移动一次就停在半空中了,所以是个不可用键游戏的加速是根据等级来确定,游戏的等级,目前是没增加50个,等级升一级;没升一级游戏方块在下落的时候会多下降一个;大概有哪些BUG:1、游戏在玩的过程中有是会出现花屏的现象,比方说方框的最下方右多出一块来,我怀疑这是系统终端自身的问题;2、由于我的图形旋转是以当前图形第一小方框的坐标来旋转的,在图形变换是有些难看,而且我是让当前的图形不断的去%上他的图形变形个数,去取相应的图形,所以,有可能由1变2不成,再按一次变形会由1直接变为3;我是采用++方式增加的;3、我的小图形是直接拷贝到大数组中,所以,在下一个图形出现的时候,会直接一次在大数组中出现,而不是一行一行的出现小图形;
Run
opuser@gto:~/tetris$ ./main


Long time no play, hand unfamiliar, O (∩_∩) o~

Summary, OH, boss, I test the machine with the game ...

IBM Supervessel Power Cloud Platform Tetris Game Chapter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.