Functions - wlsdn2316/1-tetris- GitHub Wiki

function.h V.0.10.0

Title()

Print Title

Reset()

initialize game.

Reset_main()

map(main) reset (main_org[][] initialize)

Reset_main_cpy()

map(copy) reset (main_org[][] initialize)

Draw_map()

Print UI

Draw_main()

Print Map

New_block()

Create a new block.

Check_key()

Input key and process accordingly.

Drop_block()

Drop block process.

Check_crush()

There are two ways to check for collisions. 1. Crashes the specified coordinates 2. Crashes while rotating

Check_line()

If a line is full, remove a line and increase score.

Check_level_up()

If gain goal score , level up.

Check_game_over()

Determine if the game is over.

Pause()

Game pause

Setcursortype()

Hide the cursor.

Gotoxy()