Sponsored Content
Top Forums Shell Programming and Scripting Tetris Game -- based on a shell script (new algorithm) Post 302588360 by Corona688 on Sunday 8th of January 2012 05:43:44 PM
Old 01-08-2012
Yeah, doesn't work for me either... if you're going to change anything more than colors with escape sequences, you might need to describe what terminal you need.
This User Gave Thanks to Corona688 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
TERMINAL_COLORS.D(5)						 terminal-colors.d					      TERMINAL_COLORS.D(5)

NAME
       terminal-colors.d - Configure output colorization for various utilities

SYNOPSIS
       /etc/terminal-colors.d/[[name][@term].][type]

DESCRIPTION
       Files in this directory determine the default behavior for utilities when coloring output.

       The name is a utility name.  The name is optional and when none is specified then the file is used for all unspecified utilities.

       The term is a terminal identifier (the TERM environment variable).  The terminal identifier is optional and when none is specified then the
       file is used for all unspecified terminals.

       The type is a file type.  Supported file types are:

       disable
	      Turns off output colorization for all compatible utilities.

       enable Turns on output colorization; any matching disable files are ignored.

       scheme Specifies colors used for output.  The file format may be specific to the utility, the default format is described below.

       If there are more files that match for a utility, then the  file  with  the  more  specific  filename  wins.   For  example,  the  filename
       "@xterm.scheme" has less priority than "dmesg@xterm.scheme".  The lowest priority are those files without a utility name and terminal iden-
       tifier (e.g. "disable").

       The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting.

EXAMPLES
       Disable colors for all compatible utilities:
	      touch /etc/terminal-colors.d/disable

       Disable colors for all compatible utils on a vt100 terminal:
	      touch /etc/terminal-colors.d/@vt100.disable

       Disable colors for all compatible utils except dmesg(1):
	      touch /etc/terminal-colors.d/disable

	      touch /etc/terminal-colors.d/dmesg.enable

DEFAULT SCHEME FILES FORMAT
       The following statement is recognized:

	      name color-sequence

       The name is a logical name of color sequence (for example "error").  The names are specific to the utilities.  For more details always  see
       the COLORS section in the man page for the utility.

       The color-sequence is a color name, ASCII color sequences or escape sequences.

   Color names
       black,  blink,  blue,  bold,  brown,  cyan,  darkgray,  gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta,
       lightred, magenta, red, reset, reverse, and yellow.

   ANSI color sequences
       The color sequences are composed of sequences of numbers separated by semicolons.  The most common codes are:

	       0   to restore default color
	       1   for brighter colors
	       4   for underlined text
	       5   for flashing text
	      30   for black foreground
	      31   for red foreground
	      32   for green foreground
	      33   for yellow (or brown) foreground
	      34   for blue foreground
	      35   for purple foreground
	      36   for cyan foreground
	      37   for white (or gray) foreground
	      40   for black background
	      41   for red background
	      42   for green background
	      43   for yellow (or brown) background
	      44   for blue background
	      45   for purple background
	      46   for cyan background
	      47   for white (or gray) background

   Escape sequences
       To specify control or blank characters in the color sequences, C-style -escaped notation can be used:

	      a   Bell (ASCII 7)
	         Backspace (ASCII 8)
	      e   Escape (ASCII 27)
	      f   Form feed (ASCII 12)
	      
   Newline (ASCII 10)
	      
   Carriage Return (ASCII 13)
	      	   Tab (ASCII 9)
	      v   Vertical Tab (ASCII 11)
	      ?   Delete (ASCII 127)
	      \_   Space
	      \   Backslash ()
	      ^   Caret (^)
	      #   Hash mark (#)

       Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as  well  as  a
       hash mark as the first character.

       For example, to use a red background for alert messages in the output of dmesg(1), use:

	      echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme

   Comments
       Lines where the first non-blank character is a # (hash) are ignored.  Any other use of the hash character is not interpreted as introducing
       a comment.

FILES
       $XDG_CONFIG_HOME/terminal-colors.d
       $HOME/.config/terminal-colors.d
       /etc/terminal-colors.d

ENVIRONMENT
       TERMINAL_COLORS_DEBUG=all
	      enables debug output.

COMPATIBILITY
       The terminal-colors.d functionality is currently supported by all util-linux utilities which provides colorized output.	For  more  details
       always see the COLORS section in the man page for the utility.

AVAILABILITY
       terminal-colors.d  is  part  of	the  util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils
       /util-linux/>.

util-linux							   January 2014 					      TERMINAL_COLORS.D(5)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy