{"id":113,"date":"2026-02-20T15:07:51","date_gmt":"2026-02-20T15:07:51","guid":{"rendered":"https:\/\/theroyalscode.com\/students\/l_smith\/?p=113"},"modified":"2026-02-20T15:07:51","modified_gmt":"2026-02-20T15:07:51","slug":"ref-and-pregame-day","status":"publish","type":"post","link":"https:\/\/theroyalscode.com\/students\/l_smith\/2026\/02\/20\/ref-and-pregame-day\/","title":{"rendered":"REF AND PREGAME DAY"},"content":{"rendered":"\n<p>so today i worked on my wheelchair basketball game mostly the ref and pregame files<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame \nimport random\nfrom roster import rosters\nfrom PA import PA_system\nfrom  PA import os\n \n\nclass pregame:\n\n    \n    austintown = (255, 0, 0)\n    blue_devils = (245, 228, 0)\n    corry = (245, 127, 0)\n    hubbard = (0, 8, 245)\n    masslion = (245, 114, 0)\n    pats = (133, 121, 111)\n\n    def announce(text):\n\n     print(f\"Announcer:{ \"team_name starting lineup\" \"player_name\",\"player_number\",\"player_postion\"}\")\n\n     <\/code><\/pre>\n\n\n\n<p>the RGB&#8217;s are for the pyro for the teams inrto<\/p>\n\n\n\n<p>i slso added ref ai logic <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame\nfrom foul import fouls\nimport cv2\nfrom ultralytics import YOLO\n\n# 1. Load your trained model\nmodel = YOLO('wheelchair_ref_signals.pt')\n\n# 2. Start video capture\ncap = cv2.VideoCapture(0)\n\nwhile cap.isOpened():\n    success, frame = cap.read()\n    if not success:\n        break\n\n    # 3. Detect signals\n    results = model(frame)\n\n    # 4. Interpret results\n    annotated_frame = results&#91;0].plot() # Draws bounding boxes\n    \n    # Custom logic based on results&#91;0].boxes.cls\n    # Example: If signal is 'foul', display text\n    \n    cv2.imshow('Wheelchair Basketball Ref AI', annotated_frame)\n\n    if cv2.waitKey(1) &amp; 0xFF == ord('q'):\n        break\n\ncap.release()\ncv2.destroyAllWindows()\n<\/code><\/pre>\n\n\n\n<p>i also added more abbreviations for the scoreboard<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class school_abbreviations:\n    fitch = \"AF\"\nblue_devils= \"THS\"\ncorry = \"CORRY\"\nerie_high = \"EHS\"\nGLEN_OAK = \"GOHS\" <\/code><\/pre>\n\n\n\n<p>theyre is going to be more <\/p>\n\n\n\n<p>anyway im really not sure next week i might add:<\/p>\n\n\n\n<p>a team selection menu like 2k<\/p>\n","protected":false},"excerpt":{"rendered":"<p>so today i worked on my wheelchair basketball game mostly the ref and pregame files the RGB&#8217;s are for the pyro for the teams inrto i slso added ref ai logic i also added more abbreviations for the scoreboard theyre is going to be more anyway im really not sure next week i might add: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":1,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/posts\/113\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/theroyalscode.com\/students\/l_smith\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}