Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

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

Shell Programming and Scripting


Tags
shell, tetris

Reply    
 
Thread Tools Search this Thread Display Modes
    #64  
Old Unix and Linux 07-16-2013
cesar-rgon cesar-rgon is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 26 October 2013, 7:01 AM EDT
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Awesome script!
Sponsored Links
    #65  
Old Unix and Linux 12-30-2015
Mahesh_RPM Mahesh_RPM is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 10 August 2016, 8:09 AM EDT
Posts: 14
Thanks: 4
Thanked 0 Times in 0 Posts
Tetris Game -- based on a shell script (new algorithm)

Hello,

Thanks for this wonderful Game and code, I'm a newbie to Unix and Shell Scripting, Can you please let me know how can get this script running, are there any installation steps? and i dont have root rights on my server.

Please advise!!

Thanks!!
Sponsored Links
    #66  
Old Unix and Linux 12-30-2015
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 21 October 2017, 2:19 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 5,612
Thanks: 106
Thanked 1,598 Times in 1,176 Posts
Quote:
Originally Posted by Mahesh_RPM View Post
Can you please let me know how can get this script running, are there any installation steps? and i dont have root rights on my server.
Just copy the scripts source code and save it as a regular text file, set execution rights and execute it. For example:

Save source text to file "mytetris", then:


Code:
$ chmod 754 ./mytetris
$ ./mytetris

I hope this helps.

bakunin
    #67  
Old Unix and Linux 12-31-2015
Mahesh_RPM Mahesh_RPM is offline
Registered User
 
Join Date: Jul 2013
Last Activity: 10 August 2016, 8:09 AM EDT
Posts: 14
Thanks: 4
Thanked 0 Times in 0 Posts
Hello, I'm getting below errors


Code:
[pvuser@sz1270 scripts]$ ./tetris.sh

     ----------------[Time 00:00:00:01]----------------
sleep: bad character in argument=======================||       []  []      []          []  []        []      [][][]  []      []
sleep: bad character in argument                       ||     []  []  []      []          []            []        []  []    [][][]
sleep: bad character in argument                       ||                       []      []  []                [][][][][]      []
sleep: bad character in argument                       ||                                                     []  []
sleep: bad character in argument                       ||                                                     []  [][][]
sleep: bad character in argument                       ||
sleep: bad character in argum  t                       ||
sleep: bad character in arg  []                        ||
sleep: bad character in arg[][][]                      ||
sleep: bad character in argum  t                       ||   RunLevel       PreviewLevel   SpeedLevel         ScoreLevel
sleep: bad character in arg  []                        ||   31             6              0                  0
sleep: bad character in arg[][][]                      ||
sleep: bad character in argum[]t                       ||   M|m      ===   double         N|n          ===   half
sleep: bad character in argum  t                       ||   Q|q|ESC  ===   exit           U|u          ===   one step up
sleep: bad character in arg  []                        ||   P|p      ===   pause          S|s|down     ===   one step down
sleep: bad character in arg[][][]                      ||   R|r      ===   resume         A|a|left     ===   one step left
sleep: bad character in argum[]t                       ||   W|w|up   ===   rotate         D|d|right    ===   one step right
sleep: bad character in argument                       ||   T|t      ===   transpose      Space|enter  ===   drop all down
sleep: bad character in argum  t                       ||
sleep: bad character in arg  []                        ||   Tetris Game  Version 7.1.4
sleep: bad character in arg[][][]                      ||   YongYe <complex.invoke@gmail.com>
sleep: bad character in arg00:00:00:02                 ||   11/01/2011 BeiJing China [Updated 12/01/2013]
sleep: bad character in argument                       ||                                                                  [][][]
sleep: bad character in argument                       ||   Algorithm:  [][][]                                         [][][][]
sleep: bad character in argument                       ||               []                  [][][]                         [][]
sleep: bad character in argument                       ||   [][] [][]   []  [][][][]  [][][][][]    [][]             [][]  []   [][] [][]
sleep: bad character in argument]                      ||   [] row []   []  [] (x-m)*zoomx  [][]    []  cos(a) sin(a)  []  []   []  m  []
sleep: bad character in argum[]t                       ||   []     [] = []  []              []   *  []                 []  [] + []     []
sleep: bad character in argument                       ||   [] col []   []  [] (y-n)*zoomy  []      [] -sin(a) cos(a)  []  []   []  n  []
sleep: bad character in argument                       ||   [][] [][]   []  [][][][]  [][][][]      [][]             [][]  []   [][] [][]
sleep: bad character in argument                       ||               []                                                 []
sleep: bad character in argum  t=======================||               [][][]                                         [][][]
sleep: bad character in arg  []
sleep: bad character in arg[][][]
sleep: bad character in argum  t
sleep: bad character in arg  []
sleep: bad character in arg[][][]
sleep: bad character in argum[]t
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argum  t
sleep: bad character in arg  []
sleep: bad character in arg[][][]
sleep: bad character in argum[]t
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument
sleep: bad character in argument

i tried passing some arguments which didnt solve the issue,
Sponsored Links
    #68  
Old Unix and Linux 12-31-2015
sea sea is offline
Registered User
 
Join Date: Sep 2013
Last Activity: 14 October 2016, 2:49 PM EDT
Location: Swissh
Posts: 1,285
Thanks: 256
Thanked 226 Times in 209 Posts
Try downloading the tarball, or make sure you copy-pasted everything (within the code block) from the first page.
Runs well on my machine.

If you run it it sh ./scriptname, and if it still fails, what is the output of:

Code:
ls -l /bin/sh

, if its redirecting somewhere else than bash, you'll need to call the script using:

Code:
bash ./scriptname

hth
Sponsored Links
    #69  
Old Unix and Linux 12-31-2015
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 21 October 2017, 7:19 AM EDT
Location: Simplicity
Posts: 3,781
Thanks: 311
Thanked 1,267 Times in 1,146 Posts
It seems to use a floating point e.g. 0.1 for sleep; that works only with GNU sleep.
Sponsored Links
    #70  
Old Unix and Linux 04-25-2016
anasrchid anasrchid is offline
Registered User
 
Join Date: Apr 2016
Last Activity: 9 October 2017, 5:45 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
WOW amazing! i'll try to learn from it
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Is there picture based game under linux terminal? vistastar UNIX for Dummies Questions & Answers 18 09-02-2011 12:57 AM
text based football game? dadoprso UNIX for Dummies Questions & Answers 1 04-22-2010 12:32 PM
calling 'n' number of shell scripts based on dependency in one shell script. shashi369 Shell Programming and Scripting 1 11-03-2009 04:31 PM
Need to Write Shell Script based off of this shell command Rally_Point Shell Programming and Scripting 3 06-10-2009 05:19 PM
Shell Script Poker Game earnstaf Shell Programming and Scripting 8 03-11-2008 11:46 AM



All times are GMT -4. The time now is 08:14 AM.