REF AND PREGAME DAY


so today i worked on my wheelchair basketball game mostly the ref and pregame files

import pygame 
import random
from roster import rosters
from PA import PA_system
from  PA import os
 

class pregame:

    
    austintown = (255, 0, 0)
    blue_devils = (245, 228, 0)
    corry = (245, 127, 0)
    hubbard = (0, 8, 245)
    masslion = (245, 114, 0)
    pats = (133, 121, 111)

    def announce(text):

     print(f"Announcer:{ "team_name starting lineup" "player_name","player_number","player_postion"}")

     

the RGB’s are for the pyro for the teams inrto

i slso added ref ai logic

import pygame
from foul import fouls
import cv2
from ultralytics import YOLO

# 1. Load your trained model
model = YOLO('wheelchair_ref_signals.pt')

# 2. Start video capture
cap = cv2.VideoCapture(0)

while cap.isOpened():
    success, frame = cap.read()
    if not success:
        break

    # 3. Detect signals
    results = model(frame)

    # 4. Interpret results
    annotated_frame = results[0].plot() # Draws bounding boxes
    
    # Custom logic based on results[0].boxes.cls
    # Example: If signal is 'foul', display text
    
    cv2.imshow('Wheelchair Basketball Ref AI', annotated_frame)

    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()

i also added more abbreviations for the scoreboard

class school_abbreviations:
    fitch = "AF"
blue_devils= "THS"
corry = "CORRY"
erie_high = "EHS"
GLEN_OAK = "GOHS" 

theyre is going to be more

anyway im really not sure next week i might add:

a team selection menu like 2k


Leave a Reply

Your email address will not be published. Required fields are marked *