Russian box game on the IBM supervessel power cloud platform, supervesselpower

Source: Internet
Author: User

Russian box game on the IBM supervessel power cloud platform, supervesselpower

Disclaimer: This document is only intended for learning and communication purposes and cannot be used for other commercial purposes.
Author: Chaoyang _ tony
E-mail: linzhaolover@163.com
Create Date: 2015-3-8 17:01:37 Sunday
Last Change: 18:02:02 Sunday
Reprinted please indicate the source: http://blog.csdn.net/linzhaolover

Abstract:
Tetris: When I was a child, I spent 10 yuan to go to the commissary to buy a handheld electronic game machine, playing during the day, playing at night, and taking it to the toilet. It's similar to playing mobile phones now, later, I learned about the computer and wrote one in C language in linux. On the linux platform, the terminal version, O (KERNEL _ KERNEL) O ~ Today, I am playing on the power cloud platform,

IBM supervessel power cloud platform https://ptopenlab.com/cloudlab/index.html

Download Tetris C source code

I put the source code in the csdn code for you to download.

Install git
sudo apt-get install gitgit --versiongit version 1.9.1 
Download source code
git clone https://code.csdn.net/linzhaolove/tetris.git
Compile and 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
Operation instructions shift left: a left direction key shift right: d right direction key drop: s down direction key x is directly down to the last variant: w Space key up direction key start: B pause/continue: p Exit: q help: h up: u // This key moves up once and stops in the middle of the air. Therefore, the acceleration of an unavailable key game is determined based on its level, currently, the number of game blocks is not increased by 50, and the level is increased by one. The number of game blocks dropped by one when they fell. Which bugs are there: 1. During the game playing process, the screen may appear. For example, the bottom right of the box has an extra block. I suspect this is a problem of the system terminal itself; 2. Since the rotation of my image is based on the coordinates of the first small box of the current image, it is a little ugly in the graphic transformation, in addition, I want the current graph to constantly change the number of deformation numbers of the current graph to get the corresponding graph. Therefore, it may fail from 1 to 2, once again, the deformation will change from 1 to 3; I add it in the ++ mode; 3. My small image is directly copied to the large array. Therefore, when the next graph appears, it appears directly in a large array, rather than a small graph in one row;
Run
opuser@gto:~/tetris$ ./main


I haven't played it for a long time, but I am not familiar with it. O (∩) O ~

To sum up, oh, boss, I use a game to test the machine ......

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.