Skip to content

Commit 810ff1b

Browse files
authored
Merge pull request #36 from 4201VitruvianBots/Score-Calc-Reformat
score calc yippee
2 parents c948f82 + 9ac19c1 commit 810ff1b

File tree

21 files changed

+1570
-88
lines changed

21 files changed

+1570
-88
lines changed

.dockerignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.gitignore
6+
**/.project
7+
**/.settings
8+
**/.toolstarget
9+
**/.vs
10+
**/.vscode
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/bin
15+
**/charts
16+
**/docker-compose*
17+
**/compose*
18+
**/Dockerfile*
19+
**/node_modules
20+
**/npm-debug.log
21+
**/obj
22+
**/secrets.dev.yaml
23+
**/values.dev.yaml
24+
LICENSE
25+
README.md

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
IMAGE_NAME=scouting-database
2-
CONTAINER_NAME=season-test
2+
CONTAINER_NAME=port-quals_1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
dist/
3+
venv/

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM docker/whalesay:latest
2+
LABEL Name=scoutingapp2025 Version=0.0.1
3+
RUN apt-get -y update && apt-get install -y fortunes
4+
CMD ["sh", "-c", "/usr/games/fortune -a | cowsay"]

client/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VITE_SCOUT_VERSION=2025
1+
VITE_SCOUT_VERSION=PORT_HUENEME

client/src/apps/pit/PitApp.tsx

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ function PitApp() {
7171
<h1 className='mb-4 text-center text-3xl font-bold text-[#48c55c]'>
7272
Pit App
7373
</h1>
74+
75+
<h1 className='text-center text-3x1 text-white'>Pit Scouting Guide!</h1>
76+
<p className='text-center text-md text-white'>1. Introduce yourself to the team! <br/>
77+
Ex: "Hi I'm {scouterName} and I'm from Team 4201. <br/>
78+
What are you guys working on?" <br/>
79+
2. Be curious! Engage with the members and <br/>
80+
don't treat them as if you're just surveying them. <br/>
81+
3. Compliment their robot and be friendly. <br/>
82+
Ease into questions about the robot. <br/>
83+
4. Be confident and uphold Gracious Professionalism.<br/>
84+
Good luck!!</p>
7485
</div>
7586

7687
<div className='fixed left-4 top-4 z-20 flex flex-col gap-2 rounded-md bg-slate-200 p-2'>
@@ -110,23 +121,21 @@ function PitApp() {
110121
<ConeStacker />
111122
</div>
112123

113-
<div className='mb-2 flex items-center justify-center'>
124+
<div className='mb-6 flex items-center justify-center'>
114125
<div className='flex h-72 w-2/4 flex-col items-center justify-center rounded-lg border-4 border-[#2f3646] bg-[#2f3646]'>
115-
<h1 className='text-center text-white'>Team Number</h1>
126+
<h1 className='text-center text-white text-3xl font-bold'>Team Number</h1>
116127
<TeamDropdown
117128
onChange={setTeamNumber}
118129
value={teamNumber}
119130
disabledOptions={scoutedTeams}
120131
/>
121132
</div>
122133
</div>
134+
123135

124-
125-
126-
127-
<div className='mb-8 flex items-center justify-center'>
136+
<div className='mb-6 flex items-center justify-center'>
128137
<div className='flex h-72 w-2/4 flex-col items-center justify-center rounded-lg border-4 border-[#2f3646] bg-[#2f3646] '>
129-
<h1 className='text-center text-white'>
138+
<h1 className='text-center text-white text-3xl'>
130139
Number of Batteries?
131140
</h1>
132141
<input
@@ -141,6 +150,31 @@ function PitApp() {
141150
placeholder='0'></input>
142151
</div>
143152
</div>
153+
<div className='mb-8 flex items-center justify-center'>
154+
155+
<div className='grid h-72 w-2/4 grid-cols-4 items-center justify-center rounded-lg border-4 border-[#2f3646] bg-[#2f3646] text-3xl'>
156+
<div className='col-span-4'>
157+
<h1 className='text-center text-4xl text-white font-bold'>
158+
Intake
159+
</h1>
160+
</div>
161+
162+
<div className='col-span-2 place-items-center justify-center'>
163+
<h1 className='text-left text-white mr-2 '>
164+
Hopper
165+
</h1>
166+
<input type='checkbox' className='form-checkbox h-12 w-12 text-blue-600'/>
167+
</div>
168+
<div className='col-span-2 place-items-center justify-center'>
169+
<h1 className= 'text-left text-white'>
170+
Funnel/Coral Intakes
171+
</h1>
172+
<input type='checkbox' className='form-checkbox h-12 w-12 text-blue-600'/>
173+
</div>
174+
175+
</div>
176+
177+
</div>
144178

145179
<h1 className='my-2 text-center text-white '>Robot Image</h1>
146180
<ImageUploader value={robotImage} onChange={setRobotImage} />

client/src/apps/score_calculator/ScoreCalculator.tsx

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function ScoreCalculator() {
4747
const [Deep, setDeep] = useState(0);
4848
const [Shallow, setShallow] = useState(0);
4949

50-
const autoPoints = autoLeave * 3 ;
50+
const autoPoints = autoLeave * 3 + autoCoral1 * 3 + autoCoral2 * 4 + autoCoral3 * 6 + autoCoral4 * 7 + autoAlgaeProcessor * 6 + autoAlgaeNet *4;
5151
const CoralPoints =
5252
autoCoral1 * 3 + autoCoral2 * 4 + autoCoral3 * 6 + autoCoral4 * 7 + teleCoral1 * 2 + teleCoral2 * 3 + teleCoral3 * 4 + teleCoral4 * 5;
5353
const AlgaePoints =
@@ -59,6 +59,9 @@ function ScoreCalculator() {
5959
CoralPoints +
6060
AlgaePoints +
6161
cagePoints ;
62+
const autoCoralTotal = autoCoral1 * 3 + autoCoral2 * 4 + autoCoral3 * 6 + autoCoral4 * 7;
63+
const teleCoralTotal = teleCoral1 * 2 + teleCoral2 * 3 + teleCoral3 * 4 + teleCoral4 * 5;
64+
const teleopPoints = teleCoralTotal + cagePoints + teleAlgaeNet * 4 + teleAlgaeProcessor * 6;
6265

6366
const handleReset = () => {
6467
setAutoLeave(0);
@@ -186,36 +189,39 @@ function ScoreCalculator() {
186189

187190
</div>
188191
</div>
192+
193+
<div className='grid grid-cols-12 justify-center py-2 bg-gray-800 text-black-100 text-xl'>
194+
<p className='col-span-3 border-green-800 border-4 bg-green-400 px-3 py-2 text-center'>Auto Leave</p>
195+
<p className='col-span-9 border-green-800 border-4 bg-green-300 px-3 py-2 text-center'>Points: {autoLeave*3}</p>
196+
<p className='col-span-3 border-green-800 border-4 bg-green-500 px-3 py-2 text-center'>Auto Coral</p>
197+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L1: {autoCoral1}</p>
198+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L2: {autoCoral2}</p>
199+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L3: {autoCoral3}</p>
200+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L4: {autoCoral4}</p>
201+
<p className='col-span-5 border-green-800 border-4 bg-green-400 px-3 py-2 text-center'>Points: {autoCoralTotal}</p>
202+
<p className='col-span-3 border-green-900 border-4 bg-green-400 px-3 py-2 text-center font-bold'>Total Auto</p>
203+
<p className='col-span-9 border-green-900 border-4 bg-green-300 px-3 py-2 text-center font-bold'>Points: {autoPoints}</p>
204+
<p className='col-span-3 border-green-800 border-4 bg-green-500 px-3 py-2 text-center'>Teleop Coral</p>
205+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L1: {teleCoral1+autoCoral1}</p>
206+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L2: {teleCoral2+autoCoral2}</p>
207+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L3: {teleCoral3+autoCoral3}</p>
208+
<p className='col-span-1 border-green-800 border-4 bg-green-400 px-3 py-2'>L4: {teleCoral4+autoCoral4}</p>
209+
<p className='col-span-5 border-green-800 border-4 bg-green-400 px-3 py-2 text-center'>Points: {teleCoralTotal}</p>
210+
<p className='col-span-3 border-green-800 border-4 bg-green-400 px-3 py-2 text-center'>Algae</p>
211+
<p className='col-span-2 border-green-800 border-4 bg-green-300 px-3 py-2'>Net: {teleAlgaeNet+autoAlgaeNet}</p>
212+
<p className='col-span-2 border-green-800 border-4 bg-green-300 px-3 py-2'>Processor: {teleAlgaeProcessor+autoAlgaeProcessor}</p>
213+
<p className='col-span-5 border-green-800 border-4 bg-green-300 px-3 py-2 text-center'>Points: {AlgaePoints}</p>
214+
<p className='col-span-3 border-green-800 border-4 bg-green-500 px-3 py-2 text-center'>Barge</p>
215+
<div className='col-span-4 flex'>
216+
<p className='border-green-800 border-4 bg-green-400 px-3 py-2 w-80'>Park: {park}</p>
217+
<p className='border-green-800 border-4 bg-green-400 px-3 py-2 w-80'>Deep: {Deep}</p>
218+
<p className='border-green-800 border-4 bg-green-400 px-3 py-2 w-80'>Shallow: {Shallow}</p>
219+
</div>
220+
<p className='col-span-5 border-green-800 border-4 bg-green-400 px-3 py-2 text-center'>Points: {cagePoints}</p>
221+
<p className='col-span-3 border-green-900 border-4 bg-green-400 px-3 py-2 text-center font-bold'>Total Teleop</p>
222+
<p className='col-span-9 border-green-900 border-4 bg-green-300 px-3 py-2 text-center font-bold'>Points: {teleopPoints}</p>
189223

190-
<div className='col-span-2 grid grid-cols-2 justify-center gap-2 py-2 bg-gray-800'>
191-
<p className='text-black-100 text-md rounded-md border-green-800 bg-green-400 px-3 py-2 text-center'>
192-
Leave:{' '}
193-
<span className='rounded-lg bg-black/15 p-2 py-1'>
194-
{autoPoints}
195-
</span>
196-
</p>
197-
198-
<p
199-
className={` text-black-100 text-md rounded-md border-green-800 bg-green-400 px-3 py-2 text-center`}>
200-
Coral:{' '}
201-
<span className='rounded-lg bg-black/15 p-2 py-1'>
202-
{CoralPoints}
203-
</span>
204-
</p>
205-
206-
<p className='text-black-100 text-md rounded-md border-green-800 bg-green-400 px-3 py-2 text-center'>
207-
Algae:{' '}
208-
<span className='rounded-lg bg-black/15 p-2 py-1'>
209-
{AlgaePoints}
210-
</span>
211-
</p>
212-
213-
<p className='text-black-100 text-md rounded-md border-green-800 bg-green-400 px-3 py-2 text-center'>
214-
Barge:{' '}
215-
<span className='rounded-lg bg-black/15 p-2 py-2'>
216-
{cagePoints}
217-
</span>
218-
</p>
224+
219225
</div>
220226
<p className='text-black-100 text-md rounded-md border-green-800 bg-green-400/70 px-3 py-2 text-center font-black'>
221227
Total:{' '}

client/src/apps/super/SuperApp.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,14 @@ function SuperApp() {
210210
</h1>
211211

212212
<div className='fixed left-4 top-4 z-20 flex flex-row gap-3 rounded-md bg-slate-200 p-1'>
213-
<LinkButton link='/' className='snap-none'>
213+
<LinkButton link='/'>
214214
<MaterialSymbol
215215
icon='home'
216216
size={60}
217217
fill
218218
grade={200}
219219
color='green'
220-
className='snap-none'
220+
221221
/>
222222
</LinkButton>
223223

@@ -234,7 +234,7 @@ function SuperApp() {
234234
scouterName && superPosition
235235
? 'text-green-400'
236236
: 'text-gray-400'
237-
} snap-none`}
237+
}`}
238238
/>
239239
</button>
240240
)}>
@@ -252,14 +252,14 @@ function SuperApp() {
252252

253253
<button
254254
onClick={undoHistoryCount}
255-
className='z-10 aspect-square snap-none rounded bg-[#f07800] p-1 font-bold text-black '>
255+
className='z-10 aspect-square rounded bg-[#f07800] p-1 font-bold text-black '>
256256
<MaterialSymbol
257257
icon='undo'
258258
size={60}
259259
fill
260260
grade={200}
261261
color='black'
262-
className='snap-none'
262+
263263
/>
264264
</button>
265265
</div>

client/src/apps/super/components/CannedComments.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const commentOptions: SelectOption<CommentValues>[] = [
2222
{ label: 'good driving', value: 'good_driving', color: '#50a1c7' },
2323
{ label: 'source only', value: 'source_only', color: '#c78450' },
2424
{ label: 'knock pieces', value: 'knock_pieces', color: '#c107f0' },
25+
{ label: 'coral stuck', value: 'coral stuck', color: '#c107f0' },
26+
{ label: 'algae stuck', value: 'algae stuck', color: '#c107f0' },
2527
{ label: 'clogging', value: 'clogging', color: '#c78450' },
2628
{
2729
label: 'effective defense',

0 commit comments

Comments
 (0)