{"id":28202648,"url":"https://github.com/bentted/pickturns","last_synced_at":"2026-02-28T17:02:27.517Z","repository":{"id":292760249,"uuid":"981844393","full_name":"bentted/pickturns","owner":"bentted","description":"board game night? use this app to randomly pick which players go first.","archived":false,"fork":false,"pushed_at":"2025-05-21T23:58:38.000Z","size":1178,"stargazers_count":1,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-22T00:40:34.247Z","etag":null,"topics":["board-game-python","firstcontributions","good-first-issue","opensource","opensource-projects","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bentted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-12T01:37:48.000Z","updated_at":"2025-05-21T23:58:42.000Z","dependencies_parsed_at":"2025-05-12T02:38:43.873Z","dependency_job_id":"fdbbcb32-cf52-420b-9ccf-26ebb6c0812d","html_url":"https://github.com/bentted/pickturns","commit_stats":null,"previous_names":["bentted/pickturns"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bentted/pickturns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentted%2Fpickturns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentted%2Fpickturns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentted%2Fpickturns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentted%2Fpickturns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bentted","download_url":"https://codeload.github.com/bentted/pickturns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bentted%2Fpickturns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259352901,"owners_count":22844740,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["board-game-python","firstcontributions","good-first-issue","opensource","opensource-projects","python"],"created_at":"2025-05-17T00:15:58.717Z","updated_at":"2025-10-29T19:34:24.862Z","avatar_url":"https://github.com/bentted.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Turn Picker Application\r\n\r\n## Overview\r\n\r\nThe Turn Picker application is a versatile desktop tool built with Python and Tkinter. It provides a collection of utilities designed to assist with various turn-based activities, tabletop games, and decision-making processes. The application features a user-friendly interface with support for multiple languages.\r\n\r\n## Features\r\n\r\n*   **Multi-Language Support:** The UI and content can be displayed in multiple languages, including:\r\n    *   English (en)\r\n    *   Spanish (es)\r\n    *   French (fr)\r\n    *   German (de)\r\n    *   Japanese (ja)\r\n    *   Chinese (zh)\r\n    *   Korean (ko)\r\n    *   Italian (it)\r\n    *   Portuguese (pt)\r\n    *   Russian (ru)\r\n*   **Name Selector:** Allows users to input a list of names and randomly select one. It also keeps track of previously picked names.\r\n*   **Dice Roller:** A flexible dice rolling utility that supports:\r\n    *   Rolling 1 to 10 dice simultaneously.\r\n    *   Standard dice types: d4, d6, d8, d10, d12, d20, d100.\r\n    *   Display of individual die results and the total sum.\r\n*   **D\u0026D Helper:** A dedicated screen for Dungeons \u0026 Dragons players, featuring:\r\n    *   Input fields for character name, class, and level.\r\n    *   An initiative roller.\r\n    *   Display area for character details and initiative roll results.\r\n*   **Card Game Helper:** A new module to assist with card games:\r\n    *   Dropdown menu to select from a list of popular card games (e.g., Poker, Blackjack, Uno, Bridge, Rummy, Solitaire, Go Fish, War, Crazy Eights, Spades).\r\n    *   Display area for the rules of the selected card game.\r\n    *   Card game rules are translatable and can be displayed in the selected application language.\r\n\r\n## Requirements\r\n\r\n*   Python 3.x\r\n*   Tkinter library (typically included with standard Python installations)\r\n\r\n## How to Run\r\n\r\n1.  Ensure you have Python 3 installed on your system.\r\n2.  Save the `turnpicker.py` script to a directory on your computer.\r\n3.  Open a terminal or command prompt.\r\n4.  Navigate to the directory where you saved the file.\r\n5.  Execute the script using the command:\r\n    ```bash\r\n    python turnpicker.py\r\n    ```\r\n\r\n## Application Screens and Usage\r\n\r\n### Main Window \u0026 Language Selection\r\n\r\nUpon launching the application, the main window appears.\r\n*   **Language Dropdown:** Located at the top, this dropdown allows you to change the display language of the entire application dynamically.\r\n*   **Navigation Buttons:** Buttons to switch to the different helper screens:\r\n    *   \"Name Selector\"\r\n    *   \"Dice Roller\"\r\n    *   \"D\u0026D Helper\"\r\n    *   \"Card Game Helper\"\r\n\r\n### 1. Name Selector Screen\r\n\r\n*   **Functionality:** Helps in randomly picking a name from a user-defined list.\r\n*   **UI Elements:**\r\n    *   **Name Entry Field:** Input names one by one.\r\n    *   **Add Name Button:** Adds the entered name to the list.\r\n    *   **Pick Name Button:** Randomly selects a name from the current list. The selected name is displayed.\r\n    *   **Clear List Button:** Empties the list of names.\r\n    *   **Current List Display:** Shows all names currently in the list.\r\n    *   **Previously Picked Display:** Shows names that have already been picked in the current session.\r\n    *   **Back Button:** Returns to the main navigation screen.\r\n\r\n### 2. Dice Roller Screen\r\n\r\n*   **Functionality:** Simulates rolling various types of polyhedral dice.\r\n*   **UI Elements:**\r\n    *   **Number of Dice Dropdown:** Select how many dice to roll (1 to 10).\r\n    *   **Number of Sides Dropdown:** Select the type of dice (d4, d6, d8, d10, d12, d20, d100).\r\n    *   **Roll Dice Button:** Executes the dice roll.\r\n    *   **Results Display Area:** Shows the outcome of each individual die roll and the sum of all rolls.\r\n    *   **Back Button:** Returns to the main navigation screen.\r\n\r\n### 3. D\u0026D Helper Screen\r\n\r\n*   **Functionality:** Assists Dungeons \u0026 Dragons players with character information and initiative rolls.\r\n*   **UI Elements:**\r\n    *   **Character Name Entry:** Field to input the character's name.\r\n    *   **Character Class Entry:** Field to input the character's class.\r\n    *   **Character Level Entry:** Field to input the character's level.\r\n    *   **Roll Initiative Button:** Calculates and displays an initiative roll (typically 1d20 + modifiers, though the current version might be a simple d20 roll).\r\n    *   **Display Area:** Shows the entered character details and the result of the initiative roll.\r\n    *   **Back Button:** Returns to the main navigation screen.\r\n\r\n### 4. Card Game Helper Screen\r\n\r\n*   **Functionality:** Provides rules for various card games.\r\n*   **UI Elements:**\r\n    *   **Screen Title:** \"Card Game Helper\".\r\n    *   **Select Card Game Label \u0026 Dropdown:** Allows users to choose a card game from a predefined list:\r\n        *   Poker\r\n        *   Blackjack\r\n        *   Uno\r\n        *   Bridge\r\n        *   Rummy\r\n        *   Solitaire\r\n        *   Go Fish\r\n        *   War\r\n        *   Crazy Eights\r\n        *   Spades\r\n    *   **Card Game Rules Title Label:** \"Rules:\".\r\n    *   **Rules Display Area (Text Widget):** Shows the rules for the selected card game in the currently active application language. If a translation is not available for a specific game in the selected language, it defaults to English.\r\n    *   **Back Button:** Returns to the main navigation screen.\r\n\r\n## Internationalization (i18n)\r\n\r\nThe application is designed to be easily translatable.\r\n\r\n### UI Text Translations\r\n\r\n*   All UI text elements (labels, button texts, titles) are stored in a nested dictionary named `translations` within `turnpicker.py`.\r\n*   The structure is `translations[language_code][key] = \"Translated Text\"`.\r\n    *   Example: `translations['es']['app_title'] = \"Selector de Turnos\"`\r\n*   To add or modify translations:\r\n    1.  Identify the language code (e.g., `'fr'` for French).\r\n    2.  Find the appropriate key for the UI element (e.g., `'name_selector_title'`).\r\n    3.  Add or update the entry in the `translations` dictionary.\r\n\r\n### Card Game Rules Translations\r\n\r\n*   Card game rules are stored in a separate nested dictionary named `card_game_rules_translations`.\r\n*   The structure is `card_game_rules_translations[language_code][game_name] = \"Translated Rules Text\"`.\r\n    *   Example: `card_game_rules_translations['fr']['Poker'] = \"Règles du Poker...\"`\r\n*   To add or update rule translations:\r\n    1.  Ensure the `game_name` matches exactly with the names in `card_games_list`.\r\n    2.  Add the translated rules under the appropriate language code and game name.\r\n    3.  The application will automatically pick up these translations when the language or game selection changes. If a translation is missing for the current language, it defaults to English rules.\r\n\r\n## Code Structure (Brief)\r\n\r\n*   **Main Script:** `turnpicker.py` contains all the application logic, UI definitions, and translation data.\r\n*   **GUI:** Built using the Tkinter library (`tk` and `ttk` modules).\r\n*   **Core Data Structures for i18n:**\r\n    *   `translations`: For general UI text.\r\n    *   `card_game_rules_translations`: For card game rules.\r\n*   **Functions:**\r\n    *   `update_ui_language()`: Handles dynamic updating of all display text when the language is changed.\r\n    *   Separate functions `show_name_selector_frame()`, `show_dice_roller_frame()`, `show_dnd_helper_frame()`, `show_card_game_frame()` manage the display of different screens.\r\n    *   `show_card_game_rules()`: Updates the rules display in the Card Game Helper based on selection and language.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Here are some ways you can help:\r\n\r\n*   **Add More Card Games:**\r\n    1.  Add the game name to the `card_games_list` in `turnpicker.py`.\r\n    2.  Add the rules for the new game (in English) to `card_game_rules_translations['en']`.\r\n*   **Translate Card Game Rules:** Provide translations for existing or new card game rules in the `card_game_rules_translations` dictionary for various languages.\r\n*   **Translate UI Text:** Add or improve translations in the `translations` dictionary for any of the supported (or new) languages.\r\n*   **Improve UI/UX:** Suggest or implement improvements to the user interface or user experience.\r\n*   **Add New Features:** Propose and/or develop new helper tools for the application.\r\n*   **Report Bugs:** If you find any issues, please report them.\r\n\r\n## License\r\n\r\nThis project is open source. (You may want to add a specific license like MIT, GPL, etc., if you decide to choose one).\r\n\r\n![Screenshot 2025-05-16 220314](https://github.com/user-attachments/assets/6f85dfaa-207f-480b-b737-595c5404c6c0)\r\n![Screenshot 2025-05-16 214604](https://github.com/user-attachments/assets/d9d2efd4-64a7-4c64-a889-84ee9fecb00f)\r\n![Screenshot 2025-05-16 213816](https://github.com/user-attachments/assets/4db52861-8489-4a21-b3fa-6668b1dfbb6e)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentted%2Fpickturns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbentted%2Fpickturns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbentted%2Fpickturns/lists"}