Understanding Tetris-game code. newbie


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Understanding Tetris-game code. newbie
# 1  
Old 03-19-2016
Understanding Tetris-game code. newbie

Hi All,

Been trying to understand the code in tetris game (in the sticky threads) & i know i have a alot reading /practice to do. it's using advanced methods with arrays and arithmetic and would much appreciate if some one can guide me to good books that's not outdated that would help me take bash understanding further. thanks in advance.

link on the game:

Code:
https://www.unix.com/shell-programming-and-scripting/174525-tetris-game-based-shell-script-new-algorithm.html


Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tetris Game -- based on a shell script (new algorithm)

GitHub - deepgrace/tetris: Tetris implementation in all kinds of Programming Languages Usage: bash Tetris_Game ] ] ] ] Range: #!/bin/bash # Tetris Game // The Art Of Shell Programming box0=(4 30) box1=(4 30 4 32) box2=(4 30 5 32) box3=(4 28 4 30 4 32) box4=(4 28 4 30... (69 Replies)
Discussion started by: complex.invoke
69 Replies

2. Programming

Tetris Game in C++

Open Source Project: https://github.com/yongye/cpp Ported from the shell: Shell (0 Replies)
Discussion started by: complex.invoke
0 Replies

3. Programming

Understanding perl code

What is the difference between the two statements below? A: $a->{"$fruit"}->{"$color"}->{size} = $size B: $size = $a->{"$fruit"}->{"$color"}->{size} Please assist. Thanks! (0 Replies)
Discussion started by: onlinelearner02
0 Replies

4. Shell Programming and Scripting

Help understanding some Perl code.

Well, I found myself trying to fix some Perl code (Ive never done any Perl in my life) and I pinpointed the place where the bug could be. But to be sure I have to know what does a few line of code mean: $files_lim =~ (/^\d*$/) $files_lim =~ (/^\d*h$/) $files_age =~ s/h// The code where... (2 Replies)
Discussion started by: RedSpyder
2 Replies

5. Shell Programming and Scripting

Help understanding Perl code.

Well, I found myself trying to fix some Perl code (Ive never done any Perl in my life) and I pinpointed the place where the bug could be. But to be sure I have to know what does a few line of code mean: $files_lim =~ (/^\d*$/) $files_lim =~ (/^\d*h$/)$files_age =~ s/h//The code where this was... (0 Replies)
Discussion started by: RedSpyder
0 Replies

6. Red Hat

Fedora tetris

Does anyone know of a fedora version of tetris? I tried to search the repository with no luck. (4 Replies)
Discussion started by: cokedude
4 Replies

7. UNIX Desktop Questions & Answers

Understanding the code

hello all, May i know what is this "DEBUG_ME $DEBUG_CMD main" doing in the below code. I am confused with alias also "alias DEBUG_ME='#'". Thanks for your help. set -x alias DEBUG_ME='#' if ; then . /product/apps/informatica/v7/pc/ExtProc/debug.ksh "$1" fi # Declaring the... (1 Reply)
Discussion started by: Ariean
1 Replies

8. Shell Programming and Scripting

Understanding of a script as a scripting newbie

Hi! I have the following script and do not understand part of it. I have a very little understanding of scripting. The script is for Nagios to check the response of fast-com.de. The guy who has written it is no longer in the company. #!/bin/sh PATH=/adm/bin:/bin:/usr/bin export PATH ... (2 Replies)
Discussion started by: locutus01
2 Replies

9. UNIX for Dummies Questions & Answers

am a newbie to unix. plz help in understanding this code.

hi everybody. please help me in understanding this code. echo "************* starting job on `date +\"%d/%m/%Y at %T\"` **************" # scriptdir=`dirname $0` . ${scriptdir}/env_params.sh # SHLIB_PATH=${ORACLE_HOME}/lib: export SHLIB_PATH export... (1 Reply)
Discussion started by: gokulj
1 Replies
Login or Register to Ask a Question
glutGameModeGet(3GLUT)						       GLUT						    glutGameModeGet(3GLUT)

NAME
glutGameModeGet - retrieves GLUT device information represented by integers. SYNTAX
int glutGameModeGet(GLenum info); ARGUMENTS
info Name of game mode information to retrieve. GLUT_GAME_MODE_ACTIVE Non-zero if GLUT's game mode is active; zero if not active. Game mode is not active initially. Game mode becomes active when glu- tEnterGameMode is called. Game mode becomes inactive when glutLeaveGameMode is called. GLUT_GAME_MODE_POSSIBLE Non-zero if the game mode string last specified to glutGameModeString is a possible game mode configuration; zero otherwise. Being "possible" does not guarantee that if game mode is entered with glutEnterGameMode that the display settings will actually changed. GLUT_GAME_MODE_DISPLAY_CHANGED should be called once game mode is entered to determine if the display mode is actually changed. GLUT_GAME_MODE_WIDTH Width in pixels of the screen when game mode is activated. GLUT_GAME_MODE_HEIGHT Height in pixels of the screen when game mode is activated. GLUT_GAME_MODE_PIXEL_DEPTH Pixel depth of the screen when game mode is activiated. GLUT_GAME_MODE_REFRESH_RATE Screen refresh rate in cyles per second (hertz) when game mode is activated. Zero is returned if the refresh rate is unknown or cannot be queried. GLUT_GAME_MODE_DISPLAY_CHANGED Non-zero if entering game mode actually changed the display settings. If the game mode string is not possible or the display mode could not be changed for any other reason, zero is returned. DESCRIPTION
glutGameModeGet retrieves GLUT game mode information represented by integers. The info parameter determines what type of game mode informa- tion to return. Requesting game mode information for an invalid GLUT game mode information name returns negative one. SEE ALSO
glutGet, glutDeviceGet, glutLayerGet, glutGameModeString, glutEnterGameMode, glutLeaveGameMode AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutGameModeGet(3GLUT)