-- Seed initial maps for the map library
-- This ensures the web platform has maps to display even before the map evolver runs.
-- Each player count gets 3 starter maps with simple, valid layouts.

-- 2-player maps (180° rotational symmetry)
INSERT INTO maps (map_id, player_count, status, engagement, wall_density, energy_count, grid_width, grid_height, map_json) VALUES
('map_2p_001', 2, 'active', 0.0, 0.15, 8, 40, 40, '{"walls":[{"row":5,"col":5},{"row":5,"col":34},{"row":34,"col":5},{"row":34,"col":34}],"cores":[{"position":{"row":20,"col":20},"owner":0},{"position":{"row":20,"col":20},"owner":1}],"energy_nodes":[{"row":10,"col":10},{"row":10,"col":30},{"row":30,"col":10},{"row":30,"col":30}]}'),
('map_2p_002', 2, 'active', 0.0, 0.12, 6, 40, 40, '{"walls":[{"row":8,"col":8},{"row":8,"col":31},{"row":31,"col":8},{"row":31,"col":31},{"row":15,"col":20},{"row":15,"col":25},{"row":24,"col":20},{"row":24,"col":25}],"cores":[{"position":{"row":20,"col":20},"owner":0},{"position":{"row":20,"col":20},"owner":1}],"energy_nodes":[{"row":12,"col":12},{"row":12,"col":28},{"row":28,"col":12},{"row":28,"col":28}]}'),
('map_2p_003', 2, 'active', 0.0, 0.18, 10, 40, 40, '{"walls":[{"row":10,"col":10},{"row":10,"col":30},{"row":30,"col":10},{"row":30,"col":30}],"cores":[{"position":{"row":20,"col":20},"owner":0},{"position":{"row":20,"col":20},"owner":1}],"energy_nodes":[{"row":8,"col":8},{"row":8,"col":32},{"row":32,"col":8},{"row":32,"col":32}]}');

-- 3-player maps (120° rotational symmetry)
INSERT INTO maps (map_id, player_count, status, engagement, wall_density, energy_count, grid_width, grid_height, map_json) VALUES
('map_3p_001', 3, 'active', 0.0, 0.15, 9, 46, 46, '{"walls":[{"row":8,"col":8},{"row":8,"col":37},{"row":37,"col":8},{"row":37,"col":37}],"cores":[{"position":{"row":23,"col":23},"owner":0},{"position":{"row":23,"col":23},"owner":1},{"position":{"row":23,"col":23},"owner":2}],"energy_nodes":[{"row":15,"col":15},{"row":31,"col":15},{"row":15,"col":31}]}'),
('map_3p_002', 3, 'active', 0.0, 0.12, 12, 46, 46, '{"walls":[{"row":5,"col":5},{"row":5,"col":40},{"row":40,"col":5},{"row":40,"col":40},{"row":23,"col":23},{"row":23,"col":23}],"cores":[{"position":{"row":23,"col":23},"owner":0},{"position":{"row":23,"col":23},"owner":1},{"position":{"row":23,"col":23},"owner":2}],"energy_nodes":[{"row":12,"col":12},{"row":12,"col":34},{"row":34,"col":12},{"row":34,"col":34}]}'),
('map_3p_003', 3, 'active', 0.0, 0.18, 6, 46, 46, '{"walls":[{"row":10,"col":10},{"row":10,"col":35},{"row":35,"col":10},{"row":35,"col":35}],"cores":[{"position":{"row":23,"col":23},"owner":0},{"position":{"row":23,"col":23},"owner":1},{"position":{"row":23,"col":23},"owner":2}],"energy_nodes":[{"row":14,"col":14},{"row":32,"col":14},{"row":14,"col":32}]}');

-- 4-player maps (90° rotational symmetry)
INSERT INTO maps (map_id, player_count, status, engagement, wall_density, energy_count, grid_width, grid_height, map_json) VALUES
('map_4p_001', 4, 'active', 0.0, 0.15, 8, 56, 56, '{"walls":[{"row":8,"col":8},{"row":8,"col":47},{"row":47,"col":8},{"row":47,"col":47}],"cores":[{"position":{"row":28,"col":28},"owner":0},{"position":{"row":28,"col":28},"owner":1},{"position":{"row":28,"col":28},"owner":2},{"position":{"row":28,"col":28},"owner":3}],"energy_nodes":[{"row":18,"col":18},{"row":37,"col":18},{"row":18,"col":37},{"row":37,"col":18},{"row":37,"col":37}]}'),
('map_4p_002', 4, 'active', 0.0, 0.12, 12, 56, 56, '{"walls":[{"row":14,"col":14},{"row":14,"col":41},{"row":41,"col":14},{"row":41,"col":41},{"row":27,"col":27},{"row":27,"col":27}],"cores":[{"position":{"row":28,"col":28},"owner":0},{"position":{"row":28,"col":28},"owner":1},{"position":{"row":28,"col":28},"owner":2},{"position":{"row":28,"col":28},"owner":3}],"energy_nodes":[{"row":16,"col":16},{"row":40,"col":16},{"row":16,"col":40},{"row":40,"col":16},{"row":40,"col":40}]}'),
('map_4p_003', 4, 'active', 0.0, 0.18, 10, 56, 56, '{"walls":[{"row":10,"col":10},{"row":10,"col":45},{"row":45,"col":10},{"row":45,"col":45}],"cores":[{"position":{"row":28,"col":28},"owner":0},{"position":{"row":28,"col":28},"owner":1},{"position":{"row":28,"col":28},"owner":2},{"position":{"row":28,"col":28},"owner":3}],"energy_nodes":[{"row":20,"col":20},{"row":20,"col":36},{"row":36,"col":20},{"row":36,"col":36}]}');

-- 6-player maps (60° rotational symmetry)
INSERT INTO maps (map_id, player_count, status, engagement, wall_density, energy_count, grid_width, grid_height, map_json) VALUES
('map_6p_001', 6, 'active', 0.0, 0.15, 12, 77, 77, '{"walls":[{"row":10,"col":10},{"row":10,"col":66},{"row":66,"col":10},{"row":66,"col":66}],"cores":[{"position":{"row":38,"col":38},"owner":0},{"position":{"row":38,"col":38},"owner":1},{"position":{"row":38,"col":38},"owner":2},{"position":{"row":38,"col":38},"owner":3},{"position":{"row":38,"col":38},"owner":4},{"position":{"row":38,"col":38},"owner":5}],"energy_nodes":[{"row":19,"col":19},{"row":38,"col":19},{"row":57,"col":19},{"row":19,"col":57},{"row":57,"col":19},{"row":57,"col":57}]}'),
('map_6p_002', 6, 'active', 0.0, 0.12, 18, 77, 77, '{"walls":[{"row":5,"col":5},{"row":5,"col":71},{"row":71,"col":5},{"row":71,"col":71},{"row":38,"col":38}],"cores":[{"position":{"row":38,"col":38},"owner":0},{"position":{"row":38,"col":38},"owner":1},{"position":{"row":38,"col":38},"owner":2},{"position":{"row":38,"col":38},"owner":3},{"position":{"row":38,"col":38},"owner":4},{"position":{"row":38,"col":38},"owner":5}],"energy_nodes":[{"row":15,"col":15},{"row":38,"col":15},{"row":61,"col":15},{"row":15,"col":61},{"row":61,"col":15},{"row":61,"col":61}]}'),
('map_6p_003', 6, 'active', 0.0, 0.18, 15, 77, 77, '{"walls":[{"row":12,"col":12},{"row":12,"col":64},{"row":64,"col":12},{"row":64,"col":64}],"cores":[{"position":{"row":38,"col":38},"owner":0},{"position":{"row":38,"col":38},"owner":1},{"position":{"row":38,"col":38},"owner":2},{"position":{"row":38,"col":38},"owner":3},{"position":{"row":38,"col":38},"owner":4},{"position":{"row":38,"col":38},"owner":5}],"energy_nodes":[{"row":22,"col":22},{"row":38,"col":22},{"row":54,"col":22},{"row":22,"col":54},{"row":54,"col":22},{"row":54,"col":54}]}');
