AncientBeast
AncientBeast copied to clipboard
Arrow hotkeys don't work in game
Describe the bug
I can't use arrows in game. In console log I found an error about hex is undefined
To Reproduce Steps to reproduce the behavior:
- Start game
- Press any arrow button
- Look at console log
Expected behavior I looked at implementation of arrow key binding and found that it miss hex parameter For example here https://github.com/FreezingMoon/AncientBeast/blob/6a98b8f1ab1d55031612aafb2d66d7d219cd8d02/src/utility/hexgrid.js#L1128
But after I pass it behaviour is still strange. Pressing on button starts to select next to cursor hex but not next to creature. I don't know is it ok, if you give more information about how it should work I will try to fix it
This might definitely be regression. Game should be playable with mouse or keyboard only, so arrows should move the cursor, depending on active player and unit (making up/down arrows select hexagons that are forward in the direction the active player is facing). So pressing right arrow while player 1 is active would select the hexagon in front of the active unit (if possible, as in not outside of boundaries), pressing up would select the diagonal forward one on top row and so on. Hope this makes sense overall.
Yeah, I'll try to implement this