Sponsored Content
Full Discussion: Java Cat and Mouse Game
Top Forums Programming Java Cat and Mouse Game Post 302926202 by DGPickett on Friday 21st of November 2014 06:52:25 PM
Old 11-21-2014
The Animal needs to be a child/friend of the Grid object, so movement can be determined from the nature of the current 4 walls.
Code:
char Grid[5][5][4] = {{ // North, East, South, West is Grid, Water, Bridge
{ 'G', 'G', 'W', 'W' }, // Bottom left
{ 'G', 'G', 'B', 'G' },   // moving right ( x increments before y )
 .
 .
 .
 .
} };

Of course, there are other ways to encode the grid, but the more compact, the more work to figure out what happens with a direction choice.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Building a better mouse trap, or How many lines of code does it take to trap a mouse?

Hello all, I'm hoping to get a little insight from some of the wily veterans amongst you. I've written a script to check for new outgoing files to our vendors located on our ssl server. It seems to be working ok, but the final question here, will be one of logic, and/or a better way to... (4 Replies)
Discussion started by: mph
4 Replies

2. UNIX for Dummies Questions & Answers

Changing middle mouse button for pasting to right mouse button in cygwin rxvt

Hi, I'm using rxvt in Cygwin and I'm wondering how to change my mouse bindings from the middle button for pasting to the right button. The main reason why I want to do this is because my laptop doesn't have a middle mouse button. Thanks for any help! (2 Replies)
Discussion started by: sayeo
2 Replies

3. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

4. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

5. UNIX for Dummies Questions & Answers

CAt utility in java

Hello friends, could you please advice me of how to traslate this program written in C to java? #include <cstdio> main( ){ char c; c = getchar( ); while (c != EOF) { putchar(c); c = getchar( ); } } I am supposed to test the difference in time between compiling the C... (2 Replies)
Discussion started by: bentaboha87
2 Replies
QRDEL(1)						   Sun Grid Engine User Commands						  QRDEL(1)

NAME
qrdel - delete Sun Grid Engine Advance Reservations (AR) SYNTAX
qrdel [-f] [-help [-u wc_user_list] wc_ar_list DESCRIPTION
Qrdel provides a means for a user/operator/manager to delete one or more Advance Reservations (AR). A manager/operator can delete ARs belonging to any user, while a regular user can only delete his or her own ARs. If a manager wants to delete another user's AR, the man- ager can specify the AR id. By default, "qrdel wc_ar_name" will delete only the ARs belonging to that user. A manager is able to delete another user's AR via "-u wc_user_list". Jobs referring to an AR tagged for deletion will also be removed. Only if all jobs referring to an AR are removed from the Sun Grid Engine database will the AR also be removed. Qrdel deletes ARs in the order in which the AR identifiers are presented. Find additional information concerning wc_user_list and wc_ar_list in sge_types(1). OPTIONS
-f Force action for AR. The AR and the jobs using the AR are deleted from the Sun Grid Engine queuing system even if the sge_execd(8) controlling the AR jobs does not respond to the delete request sent by the sge_qmaster(8). Users which have neither Sun Grid Engine manager nor operator status can only use the -f option for their own ARs. -help Prints a list of all options. -u wc_user_list Deletes only those ARs which were submitted by users specified in the list of usernames. For managers, it is possible to use qrdel -u "*" to delete all ARs for all users. If a manager wants to delete a specific AR for a user, he has to specify the user and the AR id. If no AR is specified, all ARs belonging to that user are deleted. wc_ar_list A list of AR id's that should be deleted ENVIRONMENTAL VARIABLES
SGE_ROOT Specifies the location of the Sun Grid Engine standard configuration files. SGE_CELL If set, specifies the default Sun Grid Engine cell. To address a Sun Grid Engine cell qrdel uses (in the order of prece- dence): The name of the cell specified in the environment variable SGE_CELL, if it is set. The name of the default cell, i.e. default. SGE_DEBUG_LEVEL If set, specifies that debug information should be written to stderr. In addition the level of detail in which debug infor- mation is generated is defined. SGE_QMASTER_PORT If set, specifies the tcp port on which the sge_qmaster(8) is expected to listen for communication requests. Most installa- tions will use a service map entry for the service "sge_qmaster" instead of defining the port. FILES
<sge_root>/<cell>/common/act_qmaster Sun Grid Engine master host file SEE ALSO
sge_intro(1), qrstat(1), qrsub(1), qsub(1), sge_qmaster(8), sge_execd(8). COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ QRDEL(1)
All times are GMT -4. The time now is 01:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy