i have done only loops,if/else,arrays and functions. And im expected to finish this assignment by 5th October 2010. Would be really grateful if anyone could help me with this!!
Topic: Flip’em
Background: Flip’em is a fun matching game that helps you improve your memory. Your goal is to match each tile with its twin until all the characters behind the tiles are revealed.
Play the game: http://funschool.kaboose.com/fun-blaster/games/game_flipem.html
How to Play: 1. Click a tile. It will turn over to show you a character. There is another tile on the board that matches this one. You must try to find this tile. 2. Click another tile and see if it matches. 3. if it does, the two matching tiles will disappear 4. if it doesn’t, the two tiles will turn over again. Try to remember where you saw them 5. Repeat step 1 to step 4 until all tiles are revealed.
Your Assignment: • Develop a game with C that will automatically generate a set of board (2 dimension array) with pairs of characters randomly allocated each time the program is run. The user / player will be able to navigate through the board and flip the tile over to see the hidden character and try to find the match within the board.
Specification: • Each square contains the following suggested attributes : o a variable to store the character (by using ASCII code) o Indicator of whether the tile has been flipped over. o Indicator of what to display for the user / player to see. o Or any other attributes you think appropriate to your program Thus, square can be described as “struct” of array in the C programming language.
• The information of previous players is stored in a plain text data file. The information of all previous players should be displayed at the beginning of the game. User / player will also be prompted to key in their information to be stored in the text data.
• You are free to select the size of the array for your game. Minimum requirement of the board size will be 6 by 6.
• You are free to define the rules of the game, the criteria for winning the game, for the game to be over and evaluation of player performance. Please state the rules and instructions of your game clearly at the beginning of the program.
• Input to the system is through a DOS command window.
• Output should be printed in the DOS window as well as in a graphics window (optional) to show the latest layout of the board. For Dos Window, different characters can be used to represent the current position of player and any additional information.
• The assignment must be written in C using Quincy 2005. Build options must include strict ANSI/ISO compliance, C99 support.
Procedure Use an iterative process (spiral or prototype SDLC) to design and implement a solution to your program. That means 1. write a small program to do a little bit of the problem a. compile and run the small program 2. next, add a function or two a. compile and run the improved program 3. repeat step 2 until you are finished
Functionality This program must first prompt the user (in the command window) for the next action to be carried out. (Do provide appropriate menu of actions). After each action entered by the user, the latest layout of the board will be printed / display.
The user should be able to terminate the program at any time.
The program codes MUST be in functions. DO NOT write all the code in the “main()” function.