Subject Code : COMP1000
Country : Australia
Assignment Task:

Task:

Your task for this assignment is to design, code (in C89 version of C) and test a program. This is the work extension from Assignment 1. In summary, your program will:

• Read the parameters from text file and utilize them for the game configuration.

• Add the mirror(s) on the game map as an additional game mechanic.

• Implement a generic linked list to store the map sequence.

• Write the content of the linked list to a text file on demand.

1 Code Design Your code should be structured in a way that each file has a clear scope and goal. For example, “main.c” should only contain a main function, “map.c” should contain functions that handle and draw the map, and so on. Basically, functions should be located on reasonably appropriate files and you will link them when you write the makefile. DO NOT put everything together into one single source code file. Make sure you use the header files and header guard correctly. Make sure you free all the memories allocated by the malloc() function. Use valgrind to detect any memory leak and fix them. Memory leaks might not break your program, but penalty will still be applied if there is any. Please be aware of our coding standard (can be found on Blackboard under “Resources”) Violation of the coding standard will result in penalty on the assignment. Keep in mind that it is possible to fail the assignment with a fully-working program that is written messily, has no clear structure, full of memory leaks, and violates many of the coding standards. The purpose of this unit is to teach you a good habit of programming.

 Task Details

3.1 Quick Preview Please watch the supplementary videos on the Assignment link on Blackboard. These videos demonstrates what we expect your program should do. You will expand your first assignment “Laser Tank” with more features. Therefore, we will focus on the added features in this specification. Further details will be explained on the oncoming sections. 3.2 File Input Configurations Your executable (still called ”laserTank”) will accept 2 command line arguments. The first argument is the name of the input text file containing the information your program need to configure the game. The second argument is the name of the output text file (Please refer to section ”Write a Log File”). The format of the input file content is as follows: ............

• and determines the size of the playable map. You need these numbers for dynamic memory allocations of 2D char array (use malloc). The minimum and maximum are still 5 and 25 respectively. • and are the coordinates of the player tank. You can use these numbers as the array index of the map. Coordinate is located at top left of the map.

• is the direction the player is facing upon starting the game. There are 4 choices: u, d, l, r, which is derived from the word up, down, left, right.

• , , and have the same meaning as the previous explanations. However, these informations configure the enemy tank.

• and is the location of the mirrors on the map. There is no fixed amount of the mirrors, therefore your program should be able to keep reading it until the end of the input file. (This includes the scenario where there is no mirror at all.)

The above  COMP1000 IT/Computer Science Assignment has been solved by our   IT/Computer Science Assignment  Experts at onlineassignmentbank. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!

  • Uploaded By : admin
  • Posted on : July 06th, 2019

Whatsapp Tap to ChatGet instant assistance