-
Notifications
You must be signed in to change notification settings - Fork 129
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
Random offset based on difficulty #75
Random offset based on difficulty #75
Conversation
I think this should enable the #72 but I just tried this pr and I's not working for me. I tried setting In the debug I get zero as if the config is not getting read:
|
This is why is just a draft. It has a bug and I don't see any issue causing it. |
yes, you're right. I could not find anything wrong with the logic so I thought maybe the logging is somehow messing things and what you know. When I comment it out: /* console.log( */
/* "delete-round#getGameOptions - isDefinedUserRandomOffset ", */
/* randomOffset, */
/* ); */
/* console.log( */
/* "delete-round#getGameOptions - isDefinedUserFixedOffset ", */
/* fixedOffset, */
/* ); */ the fixed value gets correcty picked from my init.vim! let g:vim_be_good_delete_me_fixed_offset = 3
" let g:vim_be_good_delete_me_random_offset = 1 I then tried uncommenting and moving the Checking formatting...
src/game/delete-round.ts
Code style issues found in the above file(s). Forgot to run Prettier? Since I now nothing about typescript or prettier I can't help anymore.. and plus I've got to get some real work done.. |
Run |
@FL3SH please let me know when you want me to merge / review this :) |
This comment has been minimized.
This comment has been minimized.
README.md
Outdated
@@ -29,10 +29,18 @@ current buffer (only if its empty) set `vim_be_good_floating` to 0. | |||
|
|||
### Games - relative | |||
By default vim be good returns random offset for game difficult above noob, if | |||
you with to set fixed offset set `vim_be_good_delete_me_offset` to desired | |||
you with to set fixed offset set `vim_be_good_delete_me_fixed_offset` to desired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"you with to set" typo?
README.md
Outdated
You can also use `vim_be_good_delete_me_random_offset` to set minimal value of | ||
random offset. | ||
|
||
`let g:vim_be_good_delete_me_fixed_offset = 5` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should say g:vim_be_good_delete_me_random_offset
?
src/game/delete-round.ts
Outdated
let fixedOffset: number = 0; | ||
|
||
const isDefinedUserRandomOffset = await game.nvim.eval( | ||
'exists("vim_be_good_delete_me_fixed_offset")', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I debugged this for like an hour, completely confused... Then I realized that lines 24 and 27 are backward!
🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg, sorry @brandoncc ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't believe I also didn't see that! ahhahaha
@lpanebr should be fine now, you can check it ;) |
ALL seem VimBeGood now! Excellent work!!! |
@@ -120,3 +128,14 @@ idea of how to stop sucking | |||
``` | |||
- Check your new feature `NVIM_NODE_LOG_FILE=/tmp/nvim.log nvim +VimBeGood` (you can view logs with `less /tmp/nvim.log`) | |||
- Make PR | |||
|
|||
If you see something similar during your build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
No description provided.