yl365/cpp
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Tetris Game // This one is under development (ported from the shell)
// Just enjoy the one developed in shell to get the full features
// As which is pretty good!
===============================================================================
#####################################################################
# #
# License: Boost Ver 1.0+ #
# Project: https://github.com/yongye/cpp #
# Project: https://github.com/yongye/shell #
# Author : YongYe <[email protected]> #
# #
#####################################################################
Compile the source code :
g++ -std=c++11 -s -l boost_thread-mt -o Tetris_Game Tetris_Game.cpp
Run the game :
runlevel : Complexity of the pieces ( Default value is 31 )
previewlevel : Number of the pieces to be previewed ( Default value is 6 )
speedlevel : Speed of the current piece's descent ( Default value is 0 )
width : Width of the game area ( Default value is 25 )
height : Height of the game area ( Default value is 30 )
Usage : ./Tetris_Game [runlevel] [previewlevel] [speedlevel] [width] [height]
Range : [ 0 <= runlevel <= 31 ] [ previewlevel >= 1 ] [ speedlevel <= 8 ] [ width >= 17 ] [ height >= 10 ]
Notice : runlevel previewlevel speedlevel width height belong to integer
Tested Platform :
[root@node ~]# cat /etc/redhat-release
Fedora release 18 (Spherical Cow)
[root@node ~]# uname -a
Linux node 3.8.11-200.fc18.x86_64 #1 SMP Wed May 1 19:44:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@node ~]# g++ --version | grep g++
g++ (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)