Skip to content

Commit 173ea8c

Browse files
committed
Reset rotation when a piece sticks
1 parent 5f11571 commit 173ea8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tetris/game.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ defmodule Tetris.Game do
8989
collision_with_bottom?(state) || collision_with_board?(state) ->
9090
new_state = %State{state | board: board_with_overlaid_shape(state) }
9191
cleared_state = State.clear_lines(new_state)
92-
%State{cleared_state | current: state.next, x: 5, y: 0, next: Shapes.random}
92+
%State{cleared_state | current: state.next, x: 5, y: 0, next: Shapes.random, rotation: 0}
9393
:else ->
9494
%State{state | y: state.y + 1}
9595
end

0 commit comments

Comments
 (0)