Здрасьте, не понимаю почему не проходит не один из пунктов с этой задачи, помогите пожалуйста.
constants.js
import termninalKit from 'terminal-kit';
export const term = termninalKit.terminal;
export const config = {
gold: 0
}
functions.js
`export function init(term){
term('Welcome to the mining game! Press G to start')
term.clear()
term.hideCursor()
term.grabInput()
}
export function updateGold(term, state){
term.moveTo(25,2)
term.eraseLineAfter()
term.yellow.bold(`${state.gold} `)
}`
gameEngine.js
`import { init } from './functions.js'
import { handleKeyPress } from './handlers.js'
export function startMiningGame(term,state){
init(term)
const handler = handleKeyPress(term,state)
term.on('key', handler)
}`
handlers.js
`import { updateGold } from "./functions.js"
export function handleKeyPress(term, state){
return function(name,matches,data){
const keyPressed = String.fromCharCode(data.code)
if(keyPressed === 'G' || keyPressed === 'g'){
state.gold += 1
updateGold(term,state)
}
}
};`
solution.js
`// LET'S DIG SOME GOLD!
import { startMiningGame } from "./gameEngine.js";
import { term } from './constants.js'
import { config } from "./constants.js";
startMiningGame(term,config);
`