This Gist was automatically created by Carbide, a free online programming environment.
-
-
Save shadaj/50cc00cdbf475904bab62c946956b1f7 to your computer and use it in GitHub Desktop.
steamworks-calculator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var autoGear = Math.round(1); | |
var autoHighGoals = Math.round(8.0625); | |
var autoLowGoals = Math.round(0); | |
var autoCrossedLine = Math.round(0); | |
var autoLowGoalsForPoints = Math.floor(autoLowGoals / 3) * 3; | |
var autoPoints = (autoGear * 60) + (autoHighGoals * 1) + (autoLowGoalsForPoints * (1 / 3)) + (autoCrossedLine * 5); | |
var teleopGears = Math.round(0); | |
var teleopHighGoals = Math.round(0); | |
var teleopLowGoals = Math.round(0); | |
var teleopClimb = Math.round(0); | |
var teleopLowGoalsWithAuto = (autoLowGoals - autoLowGoalsForPoints) + teleopLowGoals; | |
var teleopLowGoalsForPoints = Math.floor(teleopLowGoalsWithAuto / 9) * 9; | |
var teleopHighGoalsForPoints = Math.floor(teleopHighGoals / 3) * 3; | |
var gearPoints = teleopGears >= 12 ? (120 + 100) : (teleopGears >= 6 ? 80 : (teleopGears >= 2 ? 40 : 0)); | |
var teleopPoints = Math.floor(teleopHighGoals / 3) + Math.floor(teleopLowGoalsForPoints / 9) + gearPoints + (teleopClimb * 50); | |
var allPoints = autoPoints + teleopPoints; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment