Module: uiHandlers

UI Handlers Module This module manages user interactions and UI state. Implements: 1. Drag and Drop system 2. Event handling 3. UI state management 4. Input validation
Source:

Methods

(inner) initializeDragAndDrop(canvas, gameState) → {Object}

Initializes drag and drop functionality for tower placement Implements HTML5 Drag and Drop API
Parameters:
Name Type Description
canvas HTMLCanvasElement Game canvas element
gameState Object Current game state
Source:
Returns:
Drag handlers and state information
Type
Object

(inner) placeTower(gameState, towerType, position)

Places a tower in the game grid Implements tower placement validation and state updates
Parameters:
Name Type Description
gameState Object Current game state
towerType string Type of tower to place
position Object Grid position for placement
Source: