Sponsored Content
Top Forums Shell Programming and Scripting Tetris Game -- based on a shell script (new algorithm) Post 302588336 by birei on Sunday 8th of January 2012 11:27:36 AM
Old 01-08-2012
Hi huaihaizi3,

Pretty. I've been playing some minutes and it's difficult, there are some strange pieces that are very tricky to fit Smilie

I will take a look to the source code to learn some bash scripting. Good job.

Regards,
Birei
These 2 Users Gave Thanks to birei For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script Poker Game

Original Code Taken from here: http://www.tldp.org/LDP/abs/html/bashver2.html#EX79 The code in the above link displays 4 unique 13 cards hands. I've modified it to deal a hand unique 2 card hand to 2 different players, then deal 5 unique community cards as in Texas Holdem (3 cards, then 1... (8 Replies)
Discussion started by: earnstaf
8 Replies

2. UNIX for Dummies Questions & Answers

text based football game?

Is there a textbased football game (American) that I can download through ubuntu server edition? (1 Reply)
Discussion started by: dadoprso
1 Replies

3. UNIX for Dummies Questions & Answers

Is there picture based game under linux terminal?

Is there picture based game under linux terminal? Just like Supermario under DOS. (18 Replies)
Discussion started by: vistastar
18 Replies

4. Shell Programming and Scripting

Making a Text based game. Need help.

Okay so Zork sparked my interest in this. I have been learning to program for the last year and a half. I've dabbled in everything from Java to Ruby to PHP & XHTML & SQL, and now I'm on bash. I really like bash scripting. Its easy and fun. I just started two days ago. Pretty much I've been writing... (1 Reply)
Discussion started by: lemonoid
1 Replies

5. Shell Programming and Scripting

Shell Text Based Game, This Error Makes NO sense. Please help

Okay so I'm making a simple text based game that branches into different scenarios. By branching I mean branching off into whole different files with that part of the game in it. I got tired of working on scenario 1 so I'm working on scenario 2. As I get started and try to test it, I get an... (3 Replies)
Discussion started by: lemonoid
3 Replies

6. 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

7. UNIX for Dummies Questions & Answers

[Solved] Making a text based game

Hello, I am looking to make a text based game, that runs in the command window, or a window similar. I will only need to use 1 window. I read somewhere that there is libraries for this kind of thing? But I can't remember the name of them.. Can anyone point me in a direction? I will be... (2 Replies)
Discussion started by: murphy
2 Replies

8. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: xcod3r
0 Replies

9. Shell Programming and Scripting

Proper distribution of cards in terminal based crazy8's game in bash script

When I run the following script at the bottom it say cards remaining=44...It should be=35. Can anyone tell me what I'm doing wrong. I've spent hours trying to get this to work and I can't go any further until this part works. thank you in advance Cogiz #!/bin/bash # Date="November, 2016" #... (2 Replies)
Discussion started by: cogiz
2 Replies

10. Shell Programming and Scripting

Creating a text based game using shell script.

Hello guys I'm new to shell scripting and I need to make a game using shell script. I want to know if it is possible for me a total noob to shell scripting to make this game. The game concept is simple: First thing when you launch the script you get a menu in which you select if you want to... (3 Replies)
Discussion started by: Othmane
3 Replies
CGI::Pretty(3pm)					 Perl Programmers Reference Guide					  CGI::Pretty(3pm)

NAME
CGI::Pretty - module to produce nicely formatted HTML code SYNOPSIS
use CGI::Pretty qw( :html3 ); # Print a table with a single data element print table( TR( td( "foo" ) ) ); DESCRIPTION
CGI::Pretty is a module that derives from CGI. It's sole function is to allow users of CGI to output nicely formatted HTML code. When using the CGI module, the following code: print table( TR( td( "foo" ) ) ); produces the following output: <TABLE><TR><TD>foo</TD></TR></TABLE> If a user were to create a table consisting of many rows and many columns, the resultant HTML code would be quite difficult to read since it has no carriage returns or indentation. CGI::Pretty fixes this problem. What it does is add a carriage return and indentation to the HTML code so that one can easily read it. print table( TR( td( "foo" ) ) ); now produces the following output: <TABLE> <TR> <TD>foo</TD> </TR> </TABLE> Recommendation for when to use CGI::Pretty CGI::Pretty is far slower than using CGI.pm directly. A benchmark showed that it could be about 10 times slower. Adding newlines and spaces may alter the rendered appearance of HTML. Also, the extra newlines and spaces also make the file size larger, making the files take longer to download. With all those considerations, it is recommended that CGI::Pretty be used primarily for debugging. Tags that won't be formatted The following tags are not formatted: <a>, <pre>, <code>, <script>, <textarea>, and <td>. If these tags were formatted, the user would see the extra indentation on the web browser causing the page to look different than what would be expected. If you wish to add more tags to the list of tags that are not to be touched, push them onto the @AS_IS array: push @CGI::Pretty::AS_IS,qw(XMP); Customizing the Indenting If you wish to have your own personal style of indenting, you can change the $INDENT variable: $CGI::Pretty::INDENT = " "; would cause the indents to be two tabs. Similarly, if you wish to have more space between lines, you may change the $LINEBREAK variable: $CGI::Pretty::LINEBREAK = " "; would create two carriage returns between lines. If you decide you want to use the regular CGI indenting, you can easily do the following: $CGI::Pretty::INDENT = $CGI::Pretty::LINEBREAK = ""; AUTHOR
Brian Paulsen <Brian@ThePaulsens.com>, with minor modifications by Lincoln Stein <lstein@cshl.org> for incorporation into the CGI.pm distribution. Copyright 1999, Brian Paulsen. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Bug reports and comments to Brian@ThePaulsens.com. You can also write to lstein@cshl.org, but this code looks pretty hairy to me and I'm not sure I understand it! SEE ALSO
CGI perl v5.18.2 2014-01-06 CGI::Pretty(3pm)
All times are GMT -4. The time now is 01:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy