Created
February 18, 2025 04:10
-
-
Save bwnyasse/4594d466948a3c9dfffe869d4be854e3 to your computer and use it in GitHub Desktop.
Building a Scrabble Companion with Gemini 2.0: Board State Analysis Prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String _constructImageComparisonPrompt(Map<String, dynamic> previousState) { | |
return ''' | |
Compare these two Scrabble board images: the first is the previous state, the second is after a move. | |
Identify ONLY new letters that appear in the second image. | |
Previous board state for reference: | |
${jsonEncode(previousState)} | |
Return ONLY a JSON object in exactly this format: | |
{ | |
"word": "EXAMPLE", | |
"score": 15, | |
"newLetters": [ | |
{ | |
"letter": "A", | |
"row": 7, | |
"col": 7, | |
"points": 1 | |
} | |
] | |
} | |
Rules: | |
- Use 0-based indices (0-14) for coordinates | |
- All coordinates must be within the 15x15 grid | |
- Return ONLY the JSON, no explanatory text | |
- If no valid word was played, return: {"word": "", "score": 0, "newLetters": []} | |
'''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment