class TilePosition {
  final int col; // x
  final int row; // y
  final int width;
  final int height;

  const TilePosition({
    required this.col,
    required this.row,
    this.width = 1,
    this.height = 1,
  });
}

class PrefectureTileLayout {
  // Final definitive map (Validated visually)
  // X: 0..13 (approx width)
  // Y: 0..11 (approx height)
  
  static Map<String, TilePosition> get getLayout => finalLayout;

  static const Map<String, TilePosition> finalLayout = {
    // Hokkaido & Tohoku (Shifted Left -1)
    '北海道': TilePosition(col: 10, row: 0, width: 2, height: 2),
    '青森': TilePosition(col: 10, row: 2),
    '秋田': TilePosition(col: 9, row: 3),
    '岩手': TilePosition(col: 10, row: 3),
    '山形': TilePosition(col: 9, row: 4),
    '宮城': TilePosition(col: 10, row: 4),
    '福島': TilePosition(col: 10, row: 5),

    // Kanto & Koshinetsu (Shifted Left -1)
    '茨城': TilePosition(col: 11, row: 6),
    '栃木': TilePosition(col: 10, row: 6),
    '群馬': TilePosition(col: 9, row: 6),
    '埼玉': TilePosition(col: 9, row: 7),
    '千葉': TilePosition(col: 10, row: 7), 
    '東京': TilePosition(col: 9, row: 8),
    '神奈川': TilePosition(col: 9, row: 9),
    
    '新潟': TilePosition(col: 9, row: 5), 
    '長野': TilePosition(col: 8, row: 6),  
    '山梨': TilePosition(col: 8, row: 7),  
    '静岡': TilePosition(col: 8, row: 8),

    // Hokuriku & Tokai (Shifted Left -1)
    '富山': TilePosition(col: 8, row: 5), 
    '石川': TilePosition(col: 7, row: 5), 
    '福井': TilePosition(col: 7, row: 6),
    '岐阜': TilePosition(col: 7, row: 7),
    '愛知': TilePosition(col: 7, row: 8),
    '三重': TilePosition(col: 6, row: 8),

    // Kinki (Shifted Left -1)
    '滋賀': TilePosition(col: 6, row: 7),
    '京都': TilePosition(col: 5, row: 7),
    '大阪': TilePosition(col: 5, row: 9), 
    '兵庫': TilePosition(col: 5, row: 8), 
    '奈良': TilePosition(col: 6, row: 9), 
    '和歌山': TilePosition(col: 5, row: 10),

    // Chugoku (Shifted Left -1)
    // Yamaguchi Moved UP (-1 Row)
    '鳥取': TilePosition(col: 4, row: 7),
    '岡山': TilePosition(col: 4, row: 8),
    '島根': TilePosition(col: 3, row: 7),
    '広島': TilePosition(col: 3, row: 8),
    '山口': TilePosition(col: 2, row: 7), // Row 8 -> 7

    // Shikoku (Shifted Left -1)
    '香川': TilePosition(col: 4, row: 9), 
    '徳島': TilePosition(col: 4, row: 10),
    '愛媛': TilePosition(col: 3, row: 9),
    '高知': TilePosition(col: 3, row: 10),

    // Kyushu (Shifted Left -1 AND Up -1)
    '福岡': TilePosition(col: 1, row: 7),
    '大分': TilePosition(col: 1, row: 8),
    '宮崎': TilePosition(col: 1, row: 9),
    '佐賀': TilePosition(col: 0, row: 7),
    '長崎': TilePosition(col: 0, row: 8),
    '熊本': TilePosition(col: 0, row: 9),
    '鹿児島': TilePosition(col: 0, row: 10),

    // Okinawa (Shifted Left -1 AND Up -1)
    '沖縄': TilePosition(col: 0, row: 11),
  };
}
