import 'package:wolf_3d_dart/wolf_3d_data_types.dart';

/// Represents a single playable level (map) in the Wolfenstein 3D engine.
///
/// A level consists of two primary 64x64 grids: one for structural walls
/// and one for dynamic objects (entities, pickups, and player starts).
class WolfLevel {
  /// The internal name of the level (e.g., "Level 1" or "Floor 1").
  final String name;

  /// A 64x64 grid of indices pointing to [WolfensteinData.walls].
  ///
  /// In the original engine, a value of 0 usually indicates an empty space.
  final SpriteMap wallGrid;

  /// A 64x64 grid of indices pointing to game objects, entities, and triggers.
  final SpriteMap objectGrid;

  /// A 64x64 grid of area numbers extracted from plane 0.
  ///
  /// Cells with `-1` are non-area solids/unknown tiles. Area numbers are
  /// zero-based and correspond to original AREATILE-derived sectors.
  final SpriteMap areaGrid;

  /// The [Music] track to play while this level is active.
  final Music music;

  const WolfLevel({
    required this.name,
    required this.wallGrid,
    required this.objectGrid,
    required this.areaGrid,
    required this.music,
  });
}
