TAAFT
Free mode
100% free
Freemium
Free Trial
Create tool

Oxygen Vessels

@oxygenvessels Tasks: 43
๐Ÿ› ๏ธ 2 tools ๐Ÿ™ 26 karma
Apprentice
A well-placed semicolon can save hours of debugging.
Joined: September 2024

Oxygen Vessels's tools

  • Coding Tutorial Generator
    Create custom coding tutorials with AI.
    Open
    120
    6
    4.0
    11
    Released 10mo ago
    100% Free
    ```html <!DOCTYPE html> <html> <head> <title>Matrix Tac Toe</title> </head> <body> <h1>Matrix Tac Toe</h1> <h2>Score Board:</h2> <p>Player A: <span id="scoreA">0</span></p> <p>Player B: <span id="scoreB">0</span></p> <h2>Game Board:</h2> <table id="gameBoard" border="1"> <tr> <td id="cell-0" onclick="playMove(0)"></td> <td id="cell-1" onclick="playMove(1)"></td> <td id="cell-2" onclick="playMove(2)"></td> </tr> <tr> <td id="cell-3" onclick="playMove(3)"></td> <td id="cell-4" onclick="playMove(4)"></td> <td id="cell-5" onclick="playMove(5)"></td> </tr> <tr> <td id="cell-6" onclick="playMove(6)"></td> <td id="cell-7" onclick="playMove(7)"></td> <td id="cell-8" onclick="playMove(8)"></td> </tr> </table> <p id="turn">Player A</p> <script> let currentPlayer = 'A'; let gameBoard = ['', '', '', '', '', '', '', '', '']; let scoreA = 0; let scoreB = 0; function playMove(index) { if (gameBoard[index] === '') { gameBoard[index] = currentPlayer; document.getElementById(`cell-${index}`).innerHTML = currentPlayer; if (checkWin()) { if (currentPlayer === 'A') { scoreA++; document.getElementById('scoreA').innerHTML = scoreA; highlightWinningMoves(); alert('Player A wins!'); } else { scoreB++; document.getElementById('scoreB').innerHTML = scoreB; highlightWinningMoves(); alert('Player B wins!'); } resetGame(); } else if (checkDraw()) { alert('It\'s a draw!'); resetGame(); } else { currentPlayer = currentPlayer === 'A' ? 'B' : 'A'; document.getElementById('turn').innerHTML = `Player ${currentPlayer}`; } } } function checkWin() { let winConditions = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6] ]; for (let condition of winConditions) { if (gameBoard[condition[0]] === gameBoard[condition[1]] && gameBoard[condition[1]] === gameBoard[condition[2]] && gameBoard[condition[0]] !== '') { return true; } } return false; } function checkDraw() { for (let cell of gameBoard) { if (cell === '') { return false; } } return true; } function resetGame() { gameBoard = ['', '', '', '', '', '', '', '', '']; for (let i = 0; i < 9; i++) { document.getElementById(`cell-${i}`).innerHTML = ''; } currentPlayer = 'A'; document.getElementById('turn').innerHTML = `Player ${currentPlayer}`; } function highlightWinningMoves() { let winConditions = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6] ]; for (let condition of winConditions) { if (gameBoard[condition[0]] === gameBoard[condition[1]] && gameBoard[condition[1]] === gameBoard[condition[2]] && gameBoard[condition[0]] !== '') { for (let index of condition) { let cell = document.getElementById(`cell-${index}`); if (gameBoard[condition[0]] === 'A') { cell.innerHTML = `<span style="background-color: blue; border-radius: 50%; padding: 10px;">${gameBoard[condition[0]]}</span>`; } else { cell.innerHTML = `<span style="background-color: red; border-radius: 50%; padding: 10px;">${gameBoard[condition[0]]}</span>`; } } } } } </script> </body> </html> ``` ```
  • Cinematic.ai Generator
    AI-powered cinematic visuals for filmmakers and artists
    Open
    121
    9
    5.0
    12
    Released 10mo ago
    100% Free

Comments

Oxygen Vessels
๐Ÿ› ๏ธ 2 tools ๐Ÿ™ 26 karma
Rated it
its good and simple
Oxygen Vessels
๐Ÿ› ๏ธ 2 tools ๐Ÿ™ 26 karma
Try this cinematic visuals
0 AIs selected
Clear selection
#
Name
Task