package main

import (
	"fmt"
	"log"
	"os"

	"github.com/42wim/matterbridge/bridge/jackbox"
)

func main() {
	testCases := []struct {
		gameTitle string
		roomCode  string
	}{
		{"Quiplash 3", "ABCD"},
		{"Drawful 2", "XYZ123"},
		{"Fibbage XL", "TEST"},
		{"Trivia Murder Party", "ROOM42"},
	}

	for _, tc := range testCases {
		log.Printf("Generating image for: %s - %s", tc.gameTitle, tc.roomCode)
		
		imageData, err := jackbox.GenerateRoomCodeImage(tc.roomCode, tc.gameTitle)
		if err != nil {
			log.Fatalf("Failed to generate image for %s: %v", tc.roomCode, err)
		}

		filename := fmt.Sprintf("roomcode_%s.gif", tc.roomCode)
		if err := os.WriteFile(filename, imageData, 0644); err != nil {
			log.Fatalf("Failed to write image file %s: %v", filename, err)
		}

		log.Printf("✅ Generated %s (%d bytes)", filename, len(imageData))
	}

	log.Println("\n🎉 All room code images generated successfully!")
	log.Println("Check the current directory for roomcode_*.gif files")
}

