05-08-2013
Crona688 ,
No this is not Homework. Perhaps you do not understand no one ll come up with such a bogus homework. It was my thinking to convert a crossword in a program. : ).
I made already horizontal and vertical lines to find the words ~35 out of 50 states located, remaing are hiding in the diagonal lines, Diagonal ways of crossword are tricky to match with, so I was checking for some ideas.
This was when in a place far away from my home and I was waiting 5+hrs doing nothing and someone handed me over a game paper to pass the time, I was thinking to program it. But seems it is not a good idea spending more time on it, as crosswords are meant for spending the time on that, not to be programmed. But if I spend some time I can iterate it in the other 3 sides , i am able to figured that out, from the code from RudiC. Thanks for visiting.
Last edited by rveri; 05-08-2013 at 01:01 AM..
10 More Discussions You Might Find Interesting
1. Linux
Hi all,
What I want is that can we manage printing a text file on a Dot Matrix printer installed on a Linux machine and the printer should not take the normal A4 format, but should print only to the extent the text file has text in it. What happen usually is that when we give print comand to any... (0 Replies)
Discussion started by: aman_mlt
0 Replies
2. Shell Programming and Scripting
Hi Chaps,
I'm trying to print the line number of a comma delimited file where the second field in the line is blank using AWK. Here is the code I have so far where am I going wrong. It is the last column in the file.
nawk -v x==0 'BEGIN {FS=",";OFS=","} x++ if ($2 == " ") print $x' bob.tst
... (3 Replies)
Discussion started by: rjsha1
3 Replies
3. Shell Programming and Scripting
Hi,
I have a script that fetches only specific information from fcinfo command. Below is a portion of the script.
#!/usr/bin/ksh
set -x
HBA_COUNT=`sudo fcinfo hba-port | grep -i state | awk 'END{print NR}'`
echo "$HBA_COUNT HBAs exist"
echo '........'
INDEX=1
while $INDEX -le... (2 Replies)
Discussion started by: jake_won
2 Replies
4. Shell Programming and Scripting
Hello,
any trick to print line number and last two characters of each line ? (4 Replies)
Discussion started by: Bashar
4 Replies
5. Shell Programming and Scripting
Hello, all!
I am struggling with a short script to read a diagonal matrix for later retrieval.
1.000 0.234 0.435 0.123 0.012 0.102 0.325 0.412 0.087 0.098
1.000 0.111 0.412 0.115 0.058 0.091 0.190 0.045 0.058
1.000 0.205 0.542 0.335 0.054 0.117 0.203 0.125
1.000 0.587 0.159 0.357... (11 Replies)
Discussion started by: yifangt
11 Replies
6. Shell Programming and Scripting
Hi,
I'm having a problem printing two consecutive columns, as I iterate through a large matrix by twenty columns and I was looking for a solution.
My input file looks something like this
1 id1 A1 A2 A3 A4 A5 A6....A20 A21 A22 A23....A4001 A4002
2 id2 B1 B2 B3 B4 B5 B6...
3 id3 ...
4 id4... (8 Replies)
Discussion started by: flotsam
8 Replies
7. Shell Programming and Scripting
Hi,
I am trying to get an output like :
+----------------------------------+ ----------- +
+ some variable substitution + some text +
Is there a way I can specify in printf (in ksh) the particular position I want to print a character, and also repeat a character from... (1 Reply)
Discussion started by: neil.k
1 Replies
8. Shell Programming and Scripting
Hi there,
I'm trying to use awk to print out the entire line that contains a match to a certain regex and then append some text,plus the match to the end of the line.
So far I have:
awk -F: '{print "RG:Z:" $2}' file
Which prints out the match I want plus the additional text, but I'm stuck... (3 Replies)
Discussion started by: jim_lad
3 Replies
9. Shell Programming and Scripting
Hi
I have a file profile.txt with the below input:
{"atgUserId":"736f14c4-eda2-4531-9d40-9de4d6d1fb0f","firstName":"donna","lastName":"biehler","email":"schoolathome42@live.com","receiveEmail":"y
es"},
{"atgUserId":"c3716baf-9bf8-42da-8a44-a13fff68d20f","firstName":"Gilberto... (6 Replies)
Discussion started by: ankur328
6 Replies
10. Shell Programming and Scripting
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
LEARN ABOUT DEBIAN
boggle
BOGGLE(6) BSD Games Manual BOGGLE(6)
NAME
boggle -- word search game
SYNOPSIS
boggle [-bd] [-s seed] [-t time] [-w length] [+ [+]] [boardspec]
DESCRIPTION
The object of boggle is to find as many words as possible on the Boggle board within the three minute time limit. A Boggle board is a four
by four arrangement of Boggle cubes, each side of each cube displaying a letter of the alphabet or `qu'. Words are formed by finding a
sequence of cubes (letters) that are in the game's dictionary. The (N+1)th cube in the word must be horizontally, vertically, or diagonally
adjacent to the Nth cube. Cubes cannot be reused. Words consist solely of lower case letters and must be at least 3 letters long.
Command line flags can be given to change the rules of the game.
-b Run boggle in batch mode. A boardspec must also be given. The dictionary is read from stdin and a list of words appearing in
boardspec is printed to stdout.
-d Enable debugging output.
-s seed Specify a seed seed other than the time of day.
-t time Set the time limit for each game from the default 3 minutes to time seconds.
-w length Change the minimum word length from 3 letters to length.
+ This flag allows a cube to be used multiple times, but not in succession.
++ This flag allows the same cubes to be considered adjacent to itself.
boardspec A starting board position can be specified on the command line by listing the board left to right and top to bottom.
Help is available during play by typing '?'. More detailed information on the game is given there.
BUGS
If there are a great many words in the cube the final display of the words may scroll off of the screen. (On a 25 line screen about 130
words can be displayed.)
No word can contain a 'q' that is not immediately followed by a 'u'.
When using the + or ++ options the display of words found in the board doesn't indicate reused cubes.
AUTHOR
Boggle is a trademark of Parker Brothers.
Barry Brachman
Dept. of Computer Science
University of British Columbia
BSD
April 1, 2001 BSD