squee72564 / F0_Minesweeper_Fap

A mine sweeper implementation for the flipper zero.
MIT License
12 stars 1 forks source link

Toroidal movement #7

Closed andagel closed 3 months ago

andagel commented 3 months ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] It takes a lot of clicks to reach the opposite edge of the screen.

Describe the solution you'd like A clear and concise description of what you want to happen. Allow wrapping location: when on left edge, moving left brings the cursor on the right edge. Same on the other side, and for top and bottom. In C that would be conceptually like modulo-fieldsize coordinates (current_position % fieldsize). Not a programmer, did not look at the code yet.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. I know the size of the field and click that many times, waiting for the cursor to slowly move.

Additional context Add any other context or screenshots about the feature request here.

squee72564 commented 3 months ago

Hello @andagel, this issue should already be solved with the v1.5 update; I just had my pull request merged with the official flipper zero catalog a few days ago so the most recent updates should be on the flipper labs site.

It should be a setting called "Wrap" in the settings menu. Make sure it is enabled and then the movement should wrap to the other side of the screen. You will see a change in the haptic feedback, sound, and led color displayed when the setting is turned on/off and you try to move across the "edge" of the board.

Would you mind either building from this repo or re-installing from flipper labs to ensure that it is properly updated on your device, and then let me know that everything is working properly?

Thanks for playing!

Screenshot_20240713_073114

andagel commented 3 months ago

@squee72564 indeed, I just got the most recent update and the feature is working flawlessly. Thank you for the great job!

squee72564 commented 3 months ago

@andagel Glad to hear it, enjoy!