12-08-2017
Hello rbatte1 thank you for your answer.
- Yes it is
- So far I've gotten to the menu.
- I don't get any errors since I haven't gotten really far.
- I'm using Ubuntu 16.04.
- As I said I'm just beginning in shell scripting thus I don't have any preferred tools right now.
- Nothing really.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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. Shell Programming and Scripting
Hi All,
I want to create a shell script which dynamically create text files. i am using the following script
$i=1
while
do
cat > test_$i.txt
done
but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies
3. UNIX for Dummies Questions & Answers
Is there a textbased football game (American) that I can download through ubuntu server edition? (1 Reply)
Discussion started by: dadoprso
1 Replies
4. Shell Programming and Scripting
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
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. UNIX for Dummies Questions & Answers
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
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am required to create a bash shell script with either emacs or vi. It must include the year 2014 calendar on... (9 Replies)
Discussion started by: dandanhelpmeman
9 Replies
8. Shell Programming and Scripting
I need somebody who could help with an exercise.
You have a text file called users.txt with this info inside:
users.txt:
user1:1234:/home/homedir1 ;
user2:1234:/home/homedir2 ;
user3:1234:/home/homedir3 ;
user4:1234:/home/homedir4 ;
The script should create an user using the... (2 Replies)
Discussion started by: marcosruiz
2 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
module::build::sdl
Module::Build::SDL(3pm) User Contributed Perl Documentation Module::Build::SDL(3pm)
NAME
Module::Build::SDL - Module::Build subclass for building SDL apps/games [not stable yet]
SYNOPSIS
When creating a new SDL application/game you can create Build.PL like this:
use Module::Build::SDL;
my $builder = Module::Build::SDL->new(
module_name => 'Games::Demo',
dist_version => '1.00',
dist_abstract => 'Demo game based on Module::Build::SDL',
dist_author => 'coder@cpan.org',
license => 'perl',
requires => {
'SDL' => 0,
},
#+ others Module::Build options
)->create_build_script();
Once you have created a SDL application/game via Module::Build::SDL as described above you can use some extra build targets/actions:
o you can create a PAR distribution like:
$ perl ./Build.PL
$ ./Build
$ ./Build par
There are some extra parameters related to 'par' action you can pass to Module::Build::SDL->new():
parinput => 'bin/scriptname.pl'
paroutput => 'filename.par.exe',
parlibs => [ qw/SDL SDL_main SDL_gfx/ ], #external libraries (.so/.dll) to be included into PAR
parmods => [ qw/Module::A Module::B/ ], #extra modules to be included into PAR
o to run the game from distribution directory you can use:
$ perl ./Build.PL
$ ./Build
$ ./Build run
o TODO: maybe some additional actions: parexe, parmsi, deb, rpm
DESCRIPTION
Module::Build::SDL is a subclass of Module::Build created to make easy some tasks specific to SDL applications - e.g. packaging SDL
application/game into PAR archive.
APPLICATION
/GAME LAYOUT
Module::Build::SDL expects the following layout in project directory:
#example: game with the main *.pl script + data files + modules (*.pm)
Build.PL
lib/
Games/
Demo.pm
bin/
game-script.pl
data/
whatever_data_files_you_need.jpg
the most simple game should look like:
#example: simple one-script apllication/game
Build.PL
bin/
game-script.pl
In short - there are 3 expected subdirectories:
o bin - one or more perl scripts (*.pl) to start the actual application/game
o lib - application/game specific modules (*.pm) organized in dir structure in "usual perl manners"
o data - directory for storing application data (pictures, sounds etc.). This subdirectory is handled as a "ShareDir" (see File::ShareDir
for more details)
o As the project is (or could be) composed as a standard perl distribution it also support standard subdirectory 't' (with tests).
RULES TO FOLLOW
When creating a SDL application/game based on Module::Build::SDL it is recommended to follow these rules:
o Use the name for your game from Games::* namespace; it will make the later release to CPAN much easier.
o Put all data files into data subdirectory and access the data subdir only via File::ShareDir (namely by calling distdir() function)
o TODO: maybe add more
perl v5.14.2 2012-05-28 Module::Build::SDL(3pm)