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

Additional Drill Features #2

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

zbaruch20
Copy link

I have added to the web app some additional drill features that are commonly seen throughout Summer Sessions and Tryouts. Here are the features I have added:

  • Randomized Slow Turn Counts
  • x-Countdowns
  • Box of Lefts/Rights

Randomized Slow Turn and Adjusted-Step Counts

While most slow turns are 8 counts, sometimes we can encounter a slow turn of any number of counts. When a slow turn is about to be added to the drill, the number of counts in the turn's name are replaced with a random element in the slowTurn90CountsWeighted and slowTurn180CountsWeighted arrays, for slow turns of 90° and 180°, respectively.

Examples:

  • Slow Turn 90° to the Left in 4 counts
  • Slow Turn 180° to the Right in 16 counts
  • Slow Turn 90° to the Right in 6 counts

I have also done the same thing with adjusted-step moves, using the adjustedStepCountsWeighted array.

Examples:

  • 1 8 of 12-to-5
  • 1 8 of 32-to-5
  • 1 8 of 24-5

x-Countdowns

One drill element that wasn't present in the app was x-Countdowns (e.g. 3-Countdown). I used a similar technique for the randomized slow turn and adjusted-step counts to randomly generate the length of the countdown, and the different TTRs present (with the help of turnsTurnedOn to only select TTRs that were selected by the user, and the countdownLengthsWeighted and countdownTTRsWeighted arrays to generate the countdown's length and TTRs)

Examples:

  • A 3-Countdown, your turn(s) are: Regular TTR, Box TTR
  • A 4-Countdown, your turn(s) are: Slide TTR on 2, Regular TTR, Slide TTR on 6
  • A 3-Countdown, your turn(s) are: Box TTR, Box TTR
  • A 2-Countdown, your turn(s) are: Slide TTR on 4

Box of Lefts/Rights

This was the simplest of the features to implement, as they were simply hard coded into the array of moves:

  • A Box of Lefts
  • A Box of Rights
  • A Box of Lefts, all sides facing your initial direction
  • A Box of Rights, all sides facing your initial direction

@c-o-l-i-n
Copy link
Owner

It looks like the code formatter you used changed the style of all the HTML and JS, so the entirety of both files is being completely replaced. Can you use Prettier (VS Code extension -- or some similar tool) to reformat the code how it was before?

  • Tabs (not spaces)
  • Single quotes in JS (not double quotes)
  • Limit of 80 characters per line
  • No semicolons in JS

Once the formatting is fixed, I can take a closer look at the changes.

@zbaruch20
Copy link
Author

Hmm, I did use Prettier to format the document, is there a settings file I can find to enter the options you have?

@c-o-l-i-n
Copy link
Owner

c-o-l-i-n commented Jun 7, 2021

In your VS Code settings.json (after going into Settings, click the button in the top right corner that says "Open Settings (JSON)"), paste these settings:

"prettier.singleQuote": true,
"prettier.useTabs": true,
"prettier.proseWrap": "always",
"prettier.jsxSingleQuote": true,
"prettier.semi": false,

Or set them manually within the settings GUI.

@c-o-l-i-n c-o-l-i-n self-assigned this Jun 7, 2021
@zbaruch20
Copy link
Author

zbaruch20 commented Jun 8, 2021

Alright, I fixed the formatting. Now the only revisions are the actual changes I made.

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

Successfully merging this pull request may close these issues.

2 participants