Ditutup

c program for some games - 29/04/2018 09:25 EDT

I need a a program that will allow the player to navigate and explore a dungeon that is described with a level file. See more details on the attached. If can be completed within today, better

--------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------

Dungeon Crawl
Approximate Time to Complete: 1.5 hours

You are tasked with writing a program that will allow the player to navigate and explore a dungeon that is described with a level file. A level file will specify the rooms on the first line delimited by a space, following that, each line will describe a room's pathway to another room.

The first room listed on the first line is the starting point of the level.

The level file structure:
START FOYER ELEVATOR
START > NORTH > FOYER
FOYER > SOUTH > START
START > WEST > ELEVATOR

Each pathway is broken up by spaces and the > symbols. <roomA> > WEST > <roomB> this translates to:
roomA's west's pathway connects to roomB

Annotation fo the test level file:
START FOYER ELEVATOR //START is the first room of the dungeon.
START > NORTH > FOYER //START's north pathway connects to the FOYER
FOYER > SOUTH > START //FOYER's south pathway connects to the START
START > WEST > ELEVATOR //START's west pathway connects to the ELEVATOR

The commands that a player can input:
NORTH
SOUTH
EAST
WEST
QUIT

QUIT command allows the user to quit the program, please ensure that you clean up any memory you have allocated.

The NORTH, SOUTH, EAST and WEST commands will allow the player to move between the rooms via the room's pathways. Each room has a maximum of 4 pathways.

A room will outline if the paths that are available to it by specifying the direction at the side of the room. For example if the room has a path to another room by going north it will show N on the north side of the room. Example:
---N---
| |
| |
| |
| |
| |
-------
If it does not have a path, it will be a - or | depending on the side it is on.

If a user specifies a direction that does not have a pathway the program should output:
No Path This Way

If the user inputs an invalid command the program should respond with:
What?

The room is always 9 x 5 (with a space at the start and end of the top and bottom of the room);
The name should also be outputted before drawing the room.
NORTH

START
---N---
| |
| |
W |
| |
| |
-------


Specific functions to know for this task:
fopen, fgets, sscanf, malloc, realloc, free, memset, strcpy, strcmp

Assumptions/Clarifications:
* 8192 is largest number of characters in a line from the level file.
* Room name can be variable length.
* Commands are case sensitive
* On every command (even invalid ones) you need to redraw the room
* You may assume the test files are correct.
* Room pathways do not have logical entries. If the player moves NORTH you do not need to map the previous room to SOUTH of the current room.
* If a room's pathway has already been assigned it can be overridden when reading the level file.

Examples:

Example 1:
./dungeon test_dungeon.dg

START
---N---
| |
| |
W |
| |
| |
-------

NORTH

FOYER
-------
| |
| |
| |
| |
| |
---S---

SOUTH

START
---N---
| |
| |
W |
| |
| |
-------

QUIT

Example 2:
./dungeon test_dungeon.dg

START
---N---
| |
| |
W |
| |
| |
-------

WEST

ELEVATOR
-------
| |
| |
| |
| |
| |
-------

NORTH
No Path This Way

ELEVATOR
-------
| |
| |
| |
| |
| |
-------

EAST
No Path This Way

ELEVATOR
-------
| |
| |
| |
| |
| |
-------

QUIT

Example 3:
./dungeon

No Level File Specified

Example 4:
./dungeon test_dungeon.dg

START
---N---
| |
| |
W |
| |
| |
-------

ksamdkl
What?

START
---N---
| |
| |
W |
| |
|

Kemahiran: Pengaturcaraan C, Pengaturcaraan C#, Pengaturcaraan C++, PHP, Kejuruteraan Perisian

Lihat lagi: c program outsources, c program operating system, c program of a small job for university, c programming, c++programming, opengl, java program games using playing cards, program games java, duplicate program games, overlay program games, simple java program games, gui sample program games, post processing overlay program games, free bot making program games, program games flash, scheme program games, simple program games, program games using array

Tentang Majikan:
( 19 ulasan ) Nairobi, Kenya

ID Projek: #16822643

5 pekerja bebas membida secara purata $36 untuk pekerjaan ini

liangjongai

Hi! I'm interesting your project very well. I am mastering c++ and I'm a good Mathematician. And also I have many experience and good skill about algorithm development. Let's go ahead with me

$50 USD dalam sehari
(361 Ulasan)
8.0
it2051229

Hi there, I do C programming. I went through the requirements and I would like to do this project if given the opportunity. Let me know if you are interested.

$40 USD dalam sehari
(1039 Ulasan)
7.6
sujanttt

Hello sir, I am interested in your project. I have checked the description file throughly and I assure you that I can estimate the time required for the project to be around 4 hours. If that time and price is okay with Lagi

$30 USD dalam sehari
(28 Ulasan)
4.6
ottomatik

Hey please send me a test file and all the required specifications and I’ll get this done shortly - I look forward to working on this simple game. I have plenty of experience with the C programming language - I/O for Lagi

$30 USD dalam 2 hari
(1 Ulasan)
1.2
MaRuF250

Hello, I am an experienced c programmer. I am interested to do your project. Please send me a message so that we can discuss more.

$30 USD dalam sehari
(0 Ulasan)
0.0