Skip to content

Commit

Permalink
Revert "Edited the Matches page -- now has necessary categories for t…
Browse files Browse the repository at this point in the history
…his year"
  • Loading branch information
Ryan-Bauroth authored Jan 7, 2025
1 parent 5670dcd commit 92f4c05
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ async function updateTeamData() {
<div
class="w-full my-8 text-center font-sans font-bold !text-primary text-5xl"
>
ChocoChips Scouting 🍪<! -- title! -->
ChocoChips Scouting
</div>
<UCard
class="mb-8 px-4 pb-4"
Expand Down
23 changes: 12 additions & 11 deletions pages/matches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,30 @@ const headers = [
title: 'Auto',
align: 'center',
children: [
{ title: 'Coral L1', align: 'end', value: 'auto.coralL1' },
{ title: 'Coral L2', align: 'end', value: 'auto.coralL2' },
{ title: 'Coral L3', align: 'end', value: 'auto.coralL3' },
{ title: 'Coral L4', align: 'end', value: 'auto.coralL4' },
{ title: 'Algae in Processor', align: 'end', value: 'auto.processor' },
{ title: 'Amp', align: 'end', value: 'auto.amp' },
{ title: 'Missed Amp', align: 'end', value: 'auto.missedAmp' },
{ title: 'Speaker', align: 'end', value: 'auto.speakerNA' },
{ title: 'Missed Speaker', align: 'end', value: 'auto.missedSpeaker' },
{ title: 'Position', align: 'start', value: 'auto.position' },
{ title: 'Mobility', align: 'end', value: 'auto.mobility' },
],
},
{
title: 'Tele-op',
align: 'center',
children: [
{ title: 'Coral L1', align: 'end', value: 'teleop.coralL1' },
{ title: 'Coral L2', align: 'end', value: 'teleop.coralL2' },
{ title: 'Coral L3', align: 'end', value: 'teleop.coralL3' },
{ title: 'Coral L4', align: 'end', value: 'teleop.coralL4' },
{ title: 'Algae in Processor', align: 'end', value: 'teleop.processor' },
{ title: 'Amp', align: 'end', value: 'teleop.amp' },
{ title: 'Missed Amp', align: 'end', value: 'teleop.missedAmp' },
{ title: 'Speaker', align: 'end', value: 'teleop.speakerNA' },
{ title: 'Missed Speaker', align: 'end', value: 'teleop.missedSpeaker' },
],
},
{
title: 'Endgame',
align: 'center',
children: [
{ title: 'Climb', align: 'end', value: 'endgame.endgame' },
{ title: 'Onstage', align: 'end', value: 'endgame.endgame' },
{ title: 'Trap', align: 'end', value: 'endgame.trap' },
],
},
];
Expand Down
1 change: 1 addition & 0 deletions pages/scout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ let scoutData = ref<ScoutingData>({
net: 0,
},
endgame: {
trap: 0,
endgame: [endgameOptions[0]],
},
notes: {
Expand Down
12 changes: 6 additions & 6 deletions utils/scoreMatch.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export function scoreMatch(match: any){
let autoScores = match.auto.coralL1 * 3 + match.auto.coralL2 * 4 + match.auto.coralL3 * 6 + match.auto.coralL4 * 7 + match.auto.processor * 6
let teleopScores = match.teleop.coralL1 * 2 + match.teleop.coralL2 * 3 + match.teleop.coralL3 * 4 + match.teleop.coralL4 * 5 + match.teleop.processor * 6
let endgameScores = 0
if(match.endgame.endgame.includes("Parked")) endgameScores += 2
if(match.endgame.endgame.includes("Shallow")) endgameScores += 6
if(match.endgame.endgame.includes("Deep")) endgameScores += 12
let autoScores = match.auto.speakerNA * 5 + match.auto.amp * 2 + match.auto.mobility * 2
let teleopScores = match.teleop.speakerNA * 2 + match.teleop.amp
let endgameScores = match.endgame.trap * 5
if(match.endgame.endgame.includes("Parked")) endgameScores += 1
if(match.endgame.endgame.includes("Onstage")) endgameScores += 3
if(match.endgame.endgame.includes("Harmony")) endgameScores += 2
return autoScores + teleopScores + endgameScores
}

0 comments on commit 92f4c05

Please sign in to comment.