import { supabase } from '../../lib/supabaseClient'
import type { LetterGrade } from '../../lib/judgmentGrade'

export async function submitLeaderboardScore(username: string, score: number, grade: LetterGrade) {
  return supabase.from('player_stats').insert({
    username,
    highscore: score,
    grade,
  })
}
