Skip to content

Commit c7be6db

Browse files
Minor tweaks to init
1 parent 56b8c71 commit c7be6db

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

mcp-server/src/handlers/tool-handlers.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,6 @@ async function createGameWithElicitation(gameType: string, gameId?: string, serv
189189
}
190190

191191
try {
192-
// Elicit user preferences
193-
const elicitationResult = await elicitGameCreationPreferences(server, gameType, {
194-
gameId,
195-
playerName: toolArgs?.playerName,
196-
difficulty: toolArgs?.difficulty,
197-
playerSymbol: toolArgs?.playerSymbol,
198-
maxRounds: toolArgs?.maxRounds
199192
// Validate toolArgs properties before passing them
200193
const elicitationOptions: Record<string, unknown> = { gameId };
201194
if (toolArgs) {

web/src/app/api/games/tic-tac-toe/route.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,9 @@ export async function POST(request: NextRequest) {
1515
{ id: 'ai', name: 'AI', isAI: true }
1616
]
1717

18-
// Determine who goes first based on symbol choice
19-
// X always goes first, O goes second
20-
let options: { firstPlayerId?: string } | undefined;
21-
if (playerSymbol === 'O') {
22-
// Player chose O, so AI (who gets X) goes first
23-
options = { firstPlayerId: 'ai' };
24-
} else {
25-
// Player chose X (default) or no preference, so player goes first
26-
options = { firstPlayerId: 'player1' };
27-
}
18+
const options: { firstPlayerId: string } = {
19+
firstPlayerId: playerSymbol === 'O' ? 'ai' : 'player1'
20+
};
2821

2922
const gameState = ticTacToeGame.getInitialState(players, options)
3023

0 commit comments

Comments
 (0)