AncientBeast icon indicating copy to clipboard operation
AncientBeast copied to clipboard

Arrow hotkeys don't work in game

Open TheSeally opened this issue 4 years ago • 2 comments

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:

  1. Start game
  2. Press any arrow button
  3. 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

TheSeally avatar Oct 03 '21 14:10 TheSeally

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.

DreadKnight avatar Oct 03 '21 14:10 DreadKnight

Yeah, I'll try to implement this

TheSeally avatar Oct 03 '21 14:10 TheSeally