Task: Write a C program to play a tiling game called Pentominoes, a variation of the game Tetris.

The game starts with an empty playing field (a rectangular vertical shaft called the “well”). A

pentomino, which is an arrangement of five connected squares chosen from a select set of

possible pentominoes, appears at the top of the well. The pentomino falls straight down the well

one square at a time. A pentomino cannot fall into a square already occupied by a previously

fallen pentomino. When a pentomino can fall no further, a new pentomino appears at the top of

the well and begins to fall. As pentominoes fall, a solid horizontal line without gaps may form.

When such a line is formed, it disappears and any squares above it fall down one square to fill

the newly emptied space.

Example Input File:

N r0 c0

H r1 c6

D r2 c5

D r0 c8

Output:

| |

| |

| |

| |

| |

| |

| |

| |

| |

| |

| # |

|# ### |

+———-+