Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { useEffect, useReducer } from 'react'
- // ...
- import { MOVEMENT, getNewGameState, getGameStateFromLevel } from '../game/core'
- import { registerListener } from '../utils'
- // ...
- const MOVEMENT_KEYS = {
- LEFT: [65, 37],
- RIGHT: [68, 39]
- }
- const STOP_KEY = 32
- const UPDATE_EVERY = 1000 / 60
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement