Versions - wlsdn2316/1-tetris- GitHub Wiki

v.0.x.0 : Only add
v.0.0.x : Only mod
v.1 : Final release

v.0

Original Code

v.0.1.0

Split File tetris_origin.c => main.c function.h init.h

v.0.1.1

Refactoring Files : init.h main.c function.h 1. init.h

global variable : struct

2. function.h

According to init.h changes
refactoring codes
new function : get_UI_Position()

3. main.c

According to init.h changes
refactoring codes

v.0.1.2

1. function.h

clean code check_line and drop_block

v.0.2.0

new function : file_control(), init_reset(), setCurInfo()

Only defined and declared.
Functionalizes repeated file opening and closing => file_control()
Functionalizes initial variables in reset => init_reset()
Functionalizes repeated Cursor Info => setCurInfo()

v.0.2.1

modified codes : reset(), check_game_over(), setcursortype()

< modified >
reset() #137 : file_control();
reset () #139 : init_reset();
setCurInfo () #86 #89 #92 : CurInfo = setCurInfo();
check_game_over() #595 : file_control();

All of the previous codes have been replaced as above.

v.0.2.2

modifided codes: change struct member values to local value

< modified >
move_block(); #374~#377
(*block_info).b_type      -> b_type
(*block_info).b_rotation  -> b_rotation

Change struct variables to local value.
almost value name changed in move_block();.
Improve readability.

v.0.3.0

 1 Function added , other variables changed

pause() #629: new function added
generateNextBlock() #633~651: This function works for generating next block.
{(*block_info).b_type_next} -> nextBlock: legibility improved.
new_block() #283: There was a statement that works same as generateNextBlock()
Therefore, it is replaced by generateNextBlock().
int i and y are not local variables anymore. They only work in for statement

v.0.4.0

add function : set_new_block()

Define and declare set_new_block().
set_new_block() is only setting a Block_info.

v.0.4.1

modified codes : file_control(), setcursortype(), check_key()

file_control() :
FILE * pfile = (*game_info).file; //add lines #60
(*game_info).file -> pfile
Add comment lines //#52~59

setcursortype() :
Add comment lines //#116~119

check_key() :
(*block_info).b_type-> b_type
(*block_info).b_rotation -> b_rotation
(*block_info).bx -> bx
(*block_info).by -> by
(*block_info).b_type_next -> b_type_next

Length of a structure variable is too long, replace it with a local variable.

v.0.4.2

modified code : draw_map()

< modified >
write original author and secondary author.
modified code #232 #233

v.0.4.3

modified codes : move_block()

< modified >
move_block(): #487 #506
1. (*block_info).b_rotation = ((*block_info).b_rotation + 1) % 4;
->
(*block_info).b_rotation = ((*block_info).b_rotation + 1) % 4;
b_rotation = (*block_info).b_rotation;

2. (*block_info).b_rotation -> b_rotation

Change struct variables to local value.

v.0.4.4

modified codes : move_block()

< modified >
move_block(): #492 #512
(*block_info).b_rotation -> b_rotation

Change struct variables to local value.

v.0.5.0

new function : move_left(), move_right(), move_up(), move_down(), move_bottom_rotation()
enum member : BOTTOM_ROTATOIN = 100

< function. h >
Move block to the left direction : move_left()
Move block to the right direction : move_right()
Move block to the down direction : move_ down()
Rotate the block : move_up()
Rotate the block when it touches the floor or block : move_bottom_rotation()

<init.h>
enum KEYCODE : add 'BOTTOM_ROTATOIN = 100'

v.0.5.1

modified codes : EXISTING_BLOCK
<init.h>
enum BLOCK_STATUS : add 'EXISTING_BLOCK == 1'

<function.h>
check_crush() -> non_crush
if (blocks[b_type][b_rotation][i][j] == 1)
->
if (blocks[b_type][b_rotation][i][j] == EXISTING_BLOCK)

modified codes : function name change

<main.c>
check_crush() ->non_crush() #29

only one function name change

v.0.5.2

modified codes : function name change

<main.c>
check_crush() ->non_crush() #29

only one function name change

v.0.6.0

Add function : set_map_main(),set_map_cpy(),get_map_main(),get_map_cpy()

set_map_main() : set main_org(map) status
set_map_cpy() : set main_cpy(map copy) status
get_map_main() : get main_org(map) status
get_map_cpy() : get main_cpy(map copy) status

Only define and declare.

v.0.6.1

modified codes : main_org -> set,get_map_main() , main_cpy -> set,get_map_cpy(), reset_main(), reset_main_cpy()

As add function set,get_map_main(), set,get_map_cpy(), changes as follow :
main_org -> set_map_main(), get_map_main()
main_cpy -> set_map_cpy(), get_map_cpy()

reset_main() : #192 set_map_cpy(map_info, i, j, 100) -> set_map_cpy(map_info, i, j, 999)
reset_main_cpy() : #214 set_map_cpy(map_info, i, j, 100) -> set_map_cpy(map_info, i, j, 999)

First map_copy must not match original status.

v.0.7.0

Add function : move_space()

move_space() : If input 'space' key, process it.

Only define and declare.

v.0.7.1

modified code : check_key()

check_key() : #369 , move_space().

Functionalized the codes.

v.0.7.2

modifided codes : change function name and modified comment

<modified>
check_line() : #7 #8 #13 #20
reset_main() -> Reset_main()
check_line() -> Check_line()

so on... clean code and comment modified

v.0.7.3

modifided codes : change function name and modified comment
<modified>
check_line() : #37
drop_main() -> Drop_main()

v.0.8.0

Add function : void Cal_score_line()
void Cal_score_line(): check ceiling line and down all lines one by one

v.0.8.1

modified codes : function names

All functions capitalize the first letter of the name.

v.0.9.0

Add functions : Init_Game(), Excute_Game()

Init_Game() : Initialization part at game.
Excute_Game() : Excute part at game.

Only define and declare

v.0.9.1

modified codes : main.c

As added the functions, it changed. //Init_Game() Excute_Game()

v.0.10.0

Refactoring check_level_up function

Check_levelup_popup #761 show level up and speed up popup
Game_Level_Up #749 change the game level

Everything looks good but need to work on the variables
⚠️ **GitHub.com Fallback** ⚠️