ECE-1021
HOMEWORK #7
(Last Mod: 27 November 2010 21:38:40 )
Programming Problem #6.18 (p300).
To write this program so that the display is meaningful, you will need to use the console control functions from <conio.h>.
MODIFICATION: There are many variants on the game of life, most having to do with the boundary conditions. The authors have given boundary conditions that state that the neighbors of an edge cell are only those cells immediately adjacent to it and therefore it has only five neighbors while corner cells only have three neighbors. Imagine taking a piece of graph paper and rolling it into a tube, now the "edge" cells still have eight neighbors because the grid "wraps around".
One of the most common implementations of The Game of Life approximates a spherical world by having the left edge wrap around to the right and the bottom edge wrap around to the top. This way all cells have exactly eight neighbors. Write your program using these boundary conditions.
The larger the world, the more interesting the results. Write your program so that the user can enter the desired number of rows and columns up to the full size of the screen (80x25) less one boundary column/row on all sides (so a max area of 78x23).
The program should give the option of entering a specific random number seed or having the program choose one at random.
The program should all the user to control the display of the world as follows by hitting the following keys during the simulation (without hitting the ENTER key). This can be accomplished using the functions available in <conio.h>.
<S> : Stop (Pause) the simulation
<G> : Go - continue the simulation
<Q> : Quit the simulation (but not the program)
<X> : Exit the program entirely
<J> : Jump to the generation entered by the User
<N>: Single Step to the next generation.
<+> : Increase the refresh rate (faster generations)
<-> : Decrease the refresh rate (slower generations)
<L> : Load the initial population pattern from a file whose name is entered by the user.
There is no program to turn in for this part. The next two assignments will focus on writing a program that allows the user to enter a telephone number and that then produces an audio file in the WAV format that, when played into a telephone microphone while the dial tone is present, will cause the phone to dial the entered number.
To accomplish this you need to know what waveforms need to be played in order to dial a phone using sound and you need to know how to store those waveforms in a WAV file. Your assignment for this part of the homework assignment is to look up the basic format for the WAV audio file format and understand what information is contained in it and how it is stored. You are also to look up the necessary information regarding "Touch Tone" dialing.
You are to turn in a text file (at the time when pseudocode is normally due) where you cover the information that you have found. In particular, describe what information you plan to ask from the user, how you plan to convert the phone number into WAV data, and how you will calculate all of the values that must be stored in the WAV file.
You have nothing to turn in for this program at the time that source code is due.