Hello, I'm making a basketball scoreboard app in Python, but I want it to respond to my Scratch remote control's broadcast blocks. DO you know what code to enter into the program to make it respond to the remote control? If the receiver is idle, the code should be ignored, but if it receives one, it should do the following WITHOUT affecting normal operation:
- [scratchblocks]broadcast[start/stop clock][/scratchblocks] should execute the start_stop() function.
- [scratchblocks]broadcast[reset clock][/scratchblocks] should execute the reset() function.
- [scratchblocks]broadcast[home +n][/scratchblocks] should execute the increase_home_score_by_n() function. n is a number between 1 and 3.
4.[scratchblocks]broadcast[guest +n][/scratchblocks] should execute the increase_guest_score_by_n() function. n is a number between 1 and 3.
5.[scratchblocks]broadcast[home foul +1][/scratchblocks] should execute the increase_home_fouls() function.
6.[scratchblocks]broadcast[guest foul +1][/scratchblocks] should execute the increase_guest_fouls() function.
7.[scratchblocks]broadcast[advance period][/scratchblocks] should execute the increase_period() function.
8.[scratchblocks]broadcast[set poss to home][/scratchblocks] should execute the change_poss_to_home() function.
9.[scratchblocks]broadcast[set poss to guest][/scratchblocks] should execute the change_poss_to_guest() function.
10.[scratchblocks]broadcast[toggle home bonus][/scratchblocks] should execute the toggle_home_bonus() function.
11.[scratchblocks]broadcast[toggle guest bonus][/scratchblocks] should execute the toggle_guest_bonus() function.
12.[scratchblocks]broadcast[run shot clock][/scratchblocks] should execute the shot_run_stop(1) function.
13.[scratchblocks]broadcast[stop shot clock][/scratchblocks] should execute the shot_run_stop(0) function.
14.[scratchblocks]broadcast[shot clock reset 1][/scratchblocks] should execute the reset_1() function.
15.[scratchblocks]broadcast[shot clock reset 2][/scratchblocks] should execute the reset_2() function.
16.[scratchblocks]broadcast[home tol -][/scratchblocks] should execute the remove_home_tol function.
17.[scratchblocks]broadcast[guest tol -][/scratchblocks] should execute the remove_guest_tol function.
The scoreboard should be able to respond to all 17 commands.
My scoreboard (receiver): GitHub - sserver224/BasketballScoreboard
My remote control (transmitter): Snap! Build Your Own Blocks