Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labyrinth Eliane &Vittoria #10

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

vittoriamatteoli
Copy link

Netlify link

https://maze-game-adventure.netlify.app/

Collaborators

[vittoriamatteoli, El1an3]

Copy link

@HIPPIEKICK HIPPIEKICK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well structured app! UX/UI makes sense, I like that you've put some extra thought into it 😊 Keep up the good work!

Comment on lines +35 to +41
<input
className="home-input"
type="text"
placeholder="Enter username"
value={inputUsername}
onChange={handleUsernameChange}
/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a maxLength on this since it's affecting your UI (in the paragraph)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plus make sure the input is not empty because then your app breaks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice that you included Router!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this idea! 😍

Comment on lines +18 to +36
useEffect(() => {
const handleKeyPress = (e) => {
if (e.key === 'ArrowUp') {
handleDirectionClick({ type: 'move', direction: 'North' })
} else if (e.key === 'ArrowDown') {
handleDirectionClick({ type: 'move', direction: 'South' })
} else if (e.key === 'ArrowLeft') {
handleDirectionClick({ type: 'move', direction: 'West' })
} else if (e.key === 'ArrowRight') {
handleDirectionClick({ type: 'move', direction: 'East' })
}
}

document.addEventListener('keydown', handleKeyPress)
return () => {
document.removeEventListener('keydown', handleKeyPress)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh ⭐

const [showMap, setShowMap] = useState(false)
// added style based on coordinates
useEffect(() => {
console.log('Coordinates:', gameData.coordinates)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this in production

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants