testsAndMisc-archive/python_pkg/keyboard_coop
Krzysztof kuhy Rudnicki e5fd82c822 Reduce per-file-ignores by fixing lint violations across codebase
Fix ruff violations in ~15 source files and ~60+ test files to minimize
per-file-ignores in pyproject.toml. Remaining ignores are justified with
comments explaining why each suppression is necessary.

Source fixes: FBT003 (keyword args), S310 (URL validation), SLF001
(private access), T201 (print→logging), C901 (complexity), E501 (line
length), E402 (import order).

Test fixes: SIM117 (combined with), FBT (boolean args), PERF203 (try in
loop), S310/S607 (URLs/executables), E402/E501 (imports/lines), S108
(tmp paths), PLR0913 (too many args), ARG (unused args), ANN (type
annotations), RUF059 (unused unpacked vars), PT019 (fixture naming).

Remaining per-file-ignores (with justifications):
- Tests: ARG, D, PLC0415, PLR2004, S101, SLF001
- music_gen sources: PLC0415 (heavy ML lazy imports)
- moviepy_showcase: PLC0415 (circular dependency)
- generate_images: PLR0913 (matplotlib helpers need many params)
- praca_magisterska_video: E501, E402 (long paths, mpl.use)
2026-03-25 18:58:05 +01:00
..
tests fix: resolve all pre-commit hook failures after file splits 2026-03-18 22:20:05 +01:00
__init__.py refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
_dictionary.py fix: resolve all pre-commit hook failures after file splits 2026-03-18 22:20:05 +01:00
main.py Reduce per-file-ignores by fixing lint violations across codebase 2026-03-25 18:58:05 +01:00
README.md refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
requirements.txt refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
run_game.sh refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00
run.sh feat: added run sh and makefile scripts 2026-02-22 22:00:50 +01:00
words_dictionary.json refactor: rename folders to fix N999, INP001, S311 linting rules 2025-11-30 21:20:17 +01:00

Keyboard Coop Game

A fun 2-player cooperative word game where players take turns selecting adjacent letters on a QWERTY keyboard to form valid words.

How to Play

  1. Setup: Two players take turns at the same computer
  2. Turn System: Player 1 starts by clicking any letter on the keyboard
  3. Adjacent Rule: The next player must click a letter that is adjacent to the previously selected letter
  4. Word Formation: Continue taking turns until you want to submit a word
  5. Scoring: Press ENTER to submit the word. Valid words score points exponentially based on length:
    • 3 letters: 2 points
    • 4 letters: 4 points
    • 5 letters: 8 points
    • 6 letters: 16 points
    • And so on...

Game Rules

  • Minimum Length: Words must be at least 3 letters long
  • Adjacency: Letters must be adjacent on a standard QWERTY keyboard
  • Valid Words: Only dictionary words are accepted
  • Cooperative: Both players share the same score - work together!

Keyboard Adjacency

Each key is adjacent to its neighbors (including diagonals). For example:

  • 'S' is adjacent to: Q, W, E, A, D, Z, X, C
  • 'F' is adjacent to: E, R, T, D, G, C, V, B

Controls

  • Mouse Click: Select letters and buttons
  • ENTER Key: Submit current word
  • R Key: Reset the game
  • ENTER Button: Submit current word (mouse)
  • RESET Button: Reset the game (mouse)

Installation

  1. Make sure you have Python 3.6+ installed
  2. Install dependencies:
    pip install -r requirements.txt
    
  3. Run the game:
    python main.py
    

Features

  • Visual QWERTY keyboard layout
  • Real-time adjacency highlighting
  • Turn-based gameplay with player indicators
  • Exponential scoring system
  • Built-in dictionary validation
  • Reset and restart functionality

Strategy Tips

  • Look for common word patterns and endings
  • Try to set up your partner for success
  • Longer words give exponentially more points
  • Remember that some letters have more adjacent options than others

Enjoy playing together!