Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export const BOARD_HEIGHT = 30
export const EVENT_MOVEMENTS = {
LEFT: 'ArrowLeft',
DOWN: 'ArrowDown',
RIGHT: 'ArrowRight'
RIGHT: 'ArrowRight',
UP: 'ArrowUp'
}

export const PIECES = [
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ document.addEventListener('keydown', event => {
}
}

if (event.key === 'ArrowUp') {
if (event.key === EVENT_MOVEMENTS.UP) {
const rotated = []

// ESTO ES LO MÁS COMPLICADO DE LEJOS
Expand Down