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

Vary the "DELETE ME" text minimum offset distance with the difficulty level #72

Open
lpanebr opened this issue Jul 10, 2020 · 2 comments

Comments

@lpanebr
Copy link
Contributor

lpanebr commented Jul 10, 2020

Currently the offset is fixed if the user set the vim_be_good_delete_me_offset config.

Otherwise the offset is 5 + a random number as seen bellow:

        if (isDefindedUserOffset) {
            offset = Number(
                await game.nvim.getVar("vim_be_good_delete_me_offset"),
            );
            console.log("delete-round#getColumnOffset - userOffset ", offset);
        } else {
            offset = Math.floor(Math.random() * (40 - 5)) + 5;

What if instead we had something like:

var minOffset = {noob: 0, easy: 3, medium: 5, hard: 10, nightmare: 15, tpope: 30};

            offset = Math.floor(Math.random() * (40 - 5)) + minOffset[game.difficulty];
@FL3SH
Copy link
Contributor

FL3SH commented Jul 12, 2020

Sorry, I miss the point when you mention it in my MR.

I think is a very good idea especially if you can set vim_be_good_delete_me_random_offset regardless of the difficulty because I play a lot in practice mode and I would love to have the ability to change random_offset.

@ThePrimeagen
Copy link
Owner

Yeah, I want this too! Part of the re-thinking would be to reduce the required instructions by going to Lua and thinking about all these things earlier on in the prrocess. Unfortunately I don't know lua at all, so the code will suck :)

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

No branches or pull requests

3 participants