How jorgecaniza33-coder/batalla-naval works
Batalla Naval is a Python Battleship game with a terminal menu and a tkinter game window. The player chooses local play against the CPU or a TCP network match; the game then supports fleet placement, turn-based shots, hit/miss and victory feedback, with sound and music. The graph separates rules and game state from presentation and network setup. The interface excerpt shows network-message handling and audio hooks, but not every dispatch; edges are limited to calls shown in excerpts or capabilities documented in the README.
Main entry points: interfaz.py Game window · juego.py Terminal menu · game_logic.py TCP connection · server.py Host server
Components 12
Game entry
- Terminal menu
Archivos/juego.py
Game rules
- Fleet placement
Archivos/game_logic.py - Board state
Archivos/game_logic.py - Shot tracking
Archivos/game_logic.py - CPU opponent
Archivos/game_logic.py
Network play
- Host server
Archivos/server.py - Guest client
Archivos/client.py - TCP connection
Archivos/game_logic.py
Game presentation
- Game window
Archivos/interfaz.py - Sound effects
Archivos/sonidos.py - Background music
Archivos/sonidos.py
Other components
- Player
Connections 14
- Player → Terminal menu: chooses mode
README.md - Terminal menu → Game window: opens
Archivos/juego.py - Terminal menu → Host server: starts host
Archivos/juego.py - Terminal menu → Guest client: connects guest
Archivos/juego.py - Host server → TCP connection: creates
Archivos/server.py - Guest client → TCP connection: creates
Archivos/client.py - Terminal menu → Game window: passes connection
Archivos/juego.py - Game window → Fleet placement: places fleet
README.md - Game window → Board state: plays shots
README.md - Game window → Shot tracking: records shots
README.md - Game window → CPU opponent: plays local
README.md - Game window → TCP connection: exchanges messages
Archivos/interfaz.py - Game window → Sound effects: plays effects
Archivos/interfaz.py - Game window → Background music: controls music
README.md