Sponsored Content
Homework and Emergencies Homework & Coursework Questions parsing colossal cave adventure advent.dat Post 302561585 by tamil.pamaran on Tuesday 4th of October 2011 01:21:02 PM
Old 10-04-2011
Network parsing colossal cave adventure advent.dat

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:
The course work is to implement "Colossal Cave Adventure"(350 original version) in C programming on unix environment. the detail about the game can be found here - The Colossal Cave Adventure page . I am stuck up with parsing the advent.dat which contains the structure and elements about game environment. Please explain the structure of the advent.data


2. Relevant commands, code, scripts, algorithms:

Few lines from advent.dat

1
1 YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING.
1 AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND
1 DOWN A GULLY.
2 YOU HAVE WALKED UP A HILL, STILL IN THE FOREST. THE ROAD SLOPES BACK
2 DOWN THE OTHER SIDE OF THE HILL. THERE IS A BUILDING IN THE DISTANCE.
3 YOU ARE INSIDE A BUILDING, A WELL HOUSE FOR A LARGE SPRING.
4 YOU ARE IN A VALLEY IN THE FOREST BESIDE A STREAM TUMBLING ALONG A
4 ROCKY BED.
5 YOU ARE IN OPEN FOREST, WITH A DEEP VALLEY TO ONE SIDE.
6 YOU ARE IN OPEN FOREST NEAR BOTH A VALLEY AND A ROAD.
7 AT YOUR FEET ALL THE WATER OF THE STREAM SPLASHES INTO A 2-INCH SLIT
7 IN THE ROCK. DOWNSTREAM THE STREAMBED IS BARE ROCK.
8 YOU ARE IN A 20-FOOT DEPRESSION FLOORED WITH BARE DIRT. SET INTO THE
8 DIRT IS A STRONG STEEL GRATE MOUNTED IN CONCRETE. A DRY STREAMBED
8 LEADS INTO THE DEPRESSION.
9 YOU ARE IN A SMALL CHAMBER BENEATH A 3X3 STEEL GRATE TO THE SURFACE.
9 A LOW CRAWL OVER COBBLES LEADS INWARD TO THE WEST.
10 YOU ARE CRAWLING OVER COBBLES IN A LOW PASSAGE. THERE IS A DIM LIGHT

3. The attempts at a solution (include all code and scripts):



4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Blekinge Institute of Technology, Sweden, Charlie Svanberg, DV1305

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
 

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

UNIX 'adventure'/game.

Hi there.. I know this is a kind low question, but do anyone know where I can find some hints and or clues for the "adventure" game on UNIX ? ( /usr/games/adventure ). I already searched on this forum but didnt find the answer to my question. Thanks a lot.... (3 Replies)
Discussion started by: TARFU
3 Replies

2. Shell Programming and Scripting

How to use 'ls' command to list files like *.dat, not *.*.dat?

How to use 'ls' command to list files like *.dat, not *.*.dat (5 Replies)
Discussion started by: pmcginni777
5 Replies
slabad.f(3)							      LAPACK							       slabad.f(3)

NAME
slabad.f - SYNOPSIS
Functions/Subroutines subroutine slabad (SMALL, LARGE) SLABAD Function/Subroutine Documentation subroutine slabad (realSMALL, realLARGE) SLABAD Purpose: SLABAD takes as input the values computed by SLAMCH for underflow and overflow, and returns the square root of each of these values if the log of LARGE is sufficiently large. This subroutine is intended to identify machines with a large exponent range, such as the Crays, and redefine the underflow and overflow limits to be the square roots of the values computed by SLAMCH. This subroutine is needed because SLAMCH does not compensate for poor arithmetic in the upper half of the exponent range, as is found on a Cray. Parameters: SMALL SMALL is REAL On entry, the underflow threshold as computed by SLAMCH. On exit, if LOG10(LARGE) is sufficiently large, the square root of SMALL, otherwise unchanged. LARGE LARGE is REAL On entry, the overflow threshold as computed by SLAMCH. On exit, if LOG10(LARGE) is sufficiently large, the square root of LARGE, otherwise unchanged. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 75 of file slabad.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 slabad.f(3)
All times are GMT -4. The time now is 08:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy