Question: #include house.h / * Updates the graphics for the window @ coordinates ( x , y ) to match the * ` state `

#include "house.h"
/* Updates the graphics for the window @ coordinates (x, y) to match the
*`state` array.
*
* This function modifies the `house` array by updating the characters
* inside the window located at the zero indexed coordinates (x, y) to
* match the window's state in the `state` array. If the window's
* state is 1, then the window is filled with the '#' character.
* Likewise, if the window's state is 0 in the `state` array, the
* window is filled with the '' character.
*
* Parameters:
* house -- pointer to characters representing the house
*
* state -- pointer to the game state array
*
* x -- the horizontal coordinate of the window for which the
* state will be updated (zero indexed, with 0 being
* the left column and 2 being the right column)
*
* y -- the vertical coordinate of the window for which the
* state will be updated (zero indexed, with 0 being
* the top row and 2 being the bottom row)
*/
void window_update_graphics (char *house, const int *state, int x, int y)
{
/* Step 1: Write this function! */
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!