UP | HOME

HW29
COP-3223H

Submit via git.

Create a struct type called character, that has five fields, x, y, and state (all integers), and two sprite fields, sprite1 and sprite2, both with type char ...[3][4]. Create a cow variable of type struct character and initialize it to (x, y) coordinates (1, 1), state 0, and to have the following two sprites:

^__^
(oo)
(__)
^__^
(o-)
(__)

Note that initializing the sprites will require iterating through the sprite1 and sprite2 arrays to copy them to the struct.

Author: Paul Gazzillo

Created: 2026-04-01 Wed 09:34

Validate