Day 11
Day 11
My focus today is to integrate the frontend Tic-Tac-Toe game with the backend Supabase data by first creating a Next.js API route (/api/questions) capable of fetching a random trivia question from my database. Then, I’ll modify the Tic-Tac-Toe component to call this API, display the fetched question and its options, and implement the core logic where the player must correctly answer the trivia question before being allowed to place their ‘X’ or ‘O’ on the board, making sure the turn switches correctly whether the trivia answer is right or wrong, before finally testing and debugging this new integrated gameplay loop.