Merge pull request #48 from jl777/jl777

Jl777
This commit is contained in:
blackjok3rtt
2019-04-01 12:50:08 +08:00
committed by GitHub
6 changed files with 436 additions and 97 deletions

View File

@@ -296,6 +296,14 @@ static void tg_hold(struct games_state *rs,tetris_game *obj)
obj->stored.ori = ori;
while (!tg_fits(obj, obj->falling)) {
obj->falling.loc.row--;
if (tg_fits(obj, obj->falling)) {
break;
}
obj->falling.loc.col--;
if (tg_fits(obj, obj->falling)) {
break;
}
obj->falling.loc.col += 2;
}
}
tg_put(obj, obj->falling);