$29.99
Program 2 – CS 344 This assignment asks you to write a simple game akin to old text adventure games like Adventure: (Links to an external site.)This program will introduce you to programming in C on UNIX based systems, and will get you familiar with reading and writing files.OverviewYour program will first create a series of files that hold descriptions of the rooms and how rooms are connected, and then it will offer to the player an interface for playing the game using those generated rooms.The player will begin in the “starting room” and will win the game automatically upon entering the “ending room”.Finally, the program will exit and display the path taken by the player.Specifications The first thing your program must do is generate 7 different room files, one room per file, in a directory called <username.rooms.<process id. You get to pick the names for those files, which should be hard-coded into your program. For example, the directory, if I was writing the program, should be hard-coded (except for the process id number), as:brewsteb.rooms.19903Each room has a Room Name, at least 3 outgoing connections (and at most 6 outgoing connections, where the number of outgoing connections is random) from this room to other rooms, and a room type. The connections from one room to the others should be randomly assigned – i.e. which rooms connect to each other one is random - but note that if room A connects to room B, then room B must have a connection back to room A. Because of these specs, there will always be at least one path through. Note that a room cannot connect to itself.Each file that stores a room must have exactly this form, where the … is additional room connections, as randomly generated:ROOM NAME: <room nameCONNECTION 1: <room name…ROOM TYPE: <room type