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()

Reposition cursor.

Move_left(), Move_right() ,Move_up(), Move_down(), Move_bottom_ratation()

Block move process

SetCurInfo()

Receives and stores cursor information and returns a cursor object

File_control()

Open and close the file.

Init_reset()

Initialize the variables of reset().

GenerateNextBlock()

Create the next block.

Set_new_block()

Setting the variables of new_block().

Set_map_main(), Set_map_cpy(), Get_map_main(), Get_map_cpy()

main_org : map // values are status. main_cpy : mpa copy // values are status.

Only accessible as a function.

move_space()

If input 'space' key, process it.

Init_Game()

Initialization part at game.

Excute_Game()

Excute part at game.

Check_levelup_popup()

Display level up and speed up when leveling up

Game_Level_Up()

Game Difficulty Control

Cal_Score_Line()

Line down one line if the block is full
⚠️ **GitHub.com Fallback** ⚠️