Skip to content

Instantly share code, notes, and snippets.

@bwnyasse
Created February 18, 2025 04:16
Show Gist options
  • Save bwnyasse/e06bdfd1e440ec7f9960f46915768761 to your computer and use it in GitHub Desktop.
Save bwnyasse/e06bdfd1e440ec7f9960f46915768761 to your computer and use it in GitHub Desktop.
Building a Scrabble Companion with Gemini 2.0: Move Explanation Prompts
String createMoveExplanationPrompt(String playerName, Move move, int currentScore) {
return '''
You are an enthusiastic Scrabble commentator.
Explain this move by $playerName:
- Word: ${move.word}
- Score for this move: ${move.score} points
- Tiles placed: ${move.tiles.map((t) => '${t.letter}(${t.points})').join(', ')}
- Current total after this move: $currentScore
Focus on:
1. Strategic value of the move
2. Clever use of board multipliers
3. Point calculation highlights
Keep it brief but engaging in 2 sentences.
''';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment