From 8241ed6574e4a81a2c80cfbbd91b0d6fca4c88fc Mon Sep 17 00:00:00 2001 From: ashrion Date: Sat, 11 Jul 2026 18:19:24 +0530 Subject: [PATCH] fix: remove unnecessary global statement in Rock-Paper-Scissor.py Removed 34-variable global declaration from main() since all variables are local and never accessed outside the function. Fixes #1638 --- games/Rock-Paper-Scissor/Rock-Paper-Scissor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/games/Rock-Paper-Scissor/Rock-Paper-Scissor.py b/games/Rock-Paper-Scissor/Rock-Paper-Scissor.py index bb7e869..ba8a2b0 100644 --- a/games/Rock-Paper-Scissor/Rock-Paper-Scissor.py +++ b/games/Rock-Paper-Scissor/Rock-Paper-Scissor.py @@ -59,8 +59,6 @@ def view_leaderboard(): def main(): - global ADAPT_RATE, HISTORY_CAP, MIN_ADAPTIVE, beaten_by, blended, c, choices, computer_choice, computer_score, confidence, fav, freq, i, last_move, mode, move, n, name, pct, play_again_input, player_history, predicted, remaining, result_string, rounds_played, total_trans, trans, user_choice, user_score - print("Welcome to Rock, Paper, Scissors!") print("The computer will learn your patterns and adapt — good luck! 🧠")