Robota Karşı XOX Oyunu Oyna | Ücretsiz Zeka Oyunu

TAKİP ET

Robota karşı ücretsiz XOX oyunu oyna, stratejik hamlelerle rakibini yen. Mobil uyumlu, eğlenceli ve skor sistemli klasik üç taş oyunu.

Robota Karşı XOX Oyunu, klasik üç taş mantığını modern ve eğlenceli bir deneyime dönüştüren ücretsiz bir zeka oyunudur. Oyunda sen X, robot ise O sembolünü kullanır. Amaç; aynı sembolü yatay, dikey veya çapraz biçimde üçlü sıra halinde tamamlamaktır. Basit kurallara sahip olmasına rağmen her hamle dikkat, planlama ve doğru zamanlama gerektirir. Robot, kazanma ihtimalini değerlendirir, tehlikeli hamleleri engeller ve uygun alanlara stratejik seçimler yapar. Bu nedenle oyun, yalnızca vakit geçirmek için değil, düşünme becerisini geliştirmek için de uygundur. Mobil telefon, tablet ve bilgisayarda sorunsuz çalışan XOX oyunu, sade arayüzü sayesinde kolayca oynanabilir. Skor tablosu; oyuncu galibiyetlerini, robot galibiyetlerini ve beraberlikleri takip eder. Yeni tur butonuyla oyun hızlıca yeniden başlatılabilir, skorlar istenildiğinde sıfırlanabilir. Gulum.net üzerindeki bu eğlenceli XOX oyununda stratejini kur, robotun hamlelerini tahmin et ve üçlü sırayı ilk tamamlayan sen ol. Hızlı turlar sayesinde kısa molalarda oynayabilir, her yeni karşılaşmada farklı taktikler deneyerek kendini geliştirebilir ve daha yüksek skor hedefleyebilirsin.

 

Mini Oyun

Robota Karşı XOX

Sen X, robot ise O olarak oynar. Üç sembolü yatay, dikey veya çapraz sıralayarak oyunu kazan.

Sen 0 Beraberlik 0 Robot 0 Sıra sende Yeni TurSkorları Sıfırla /* * Bütün stiller .gulum-xox altında tutulmuştur. * Gulum.net'in mevcut CSS yapısını etkilemez. */ .gulum-xox, .gulum-xox * { box-sizing: border-box; } .gulum-xox { --gulum-xox-purple: #7c3aed; --gulum-xox-purple-light: #a855f7; --gulum-xox-pink: #ec4899; --gulum-xox-blue: #38bdf8; --gulum-xox-green: #22c55e; --gulum-xox-dark: #17152d; --gulum-xox-dark-soft: #242044; --gulum-xox-text: #ffffff; --gulum-xox-muted: #c9c5dc; width: 100%; padding: 40px 16px; font-family: Arial, Helvetica, sans-serif; color: var(--gulum-xox-text); } .gulum-xox__container { position: relative; width: min(100%, 460px); margin: 0 auto; padding: 30px 26px; overflow: hidden; text-align: center; background: radial-gradient( circle at top right, rgba(168, 85, 247, 0.23), transparent 35% ), linear-gradient( 145deg, var(--gulum-xox-dark), var(--gulum-xox-dark-soft) ); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 26px; box-shadow: 0 24px 60px rgba(25, 15, 65, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08); } .gulum-xox__header { margin-bottom: 22px; } .gulum-xox__badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; margin-bottom: 12px; padding: 5px 13px; color: #ffffff; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; background: linear-gradient( 135deg, var(--gulum-xox-purple), var(--gulum-xox-pink) ); border-radius: 999px; } .gulum-xox__title { margin: 0 0 9px; padding: 0; color: #ffffff; font-size: clamp(28px, 7vw, 38px); font-weight: 800; line-height: 1.15; } .gulum-xox__description { max-width: 380px; margin: 0 auto; padding: 0; color: var(--gulum-xox-muted); font-size: 14px; line-height: 1.65; } .gulum-xox__description strong { color: #ffffff; } .gulum-xox__scoreboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; } .gulum-xox__score-card { min-width: 0; padding: 13px 8px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; } .gulum-xox__score-label { display: block; margin-bottom: 4px; overflow: hidden; color: var(--gulum-xox-muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; } .gulum-xox__score { display: block; color: #ffffff; font-size: 24px; line-height: 1; } .gulum-xox__score--player { color: var(--gulum-xox-blue); } .gulum-xox__score--robot { color: #fb71b0; } .gulum-xox__status { display: flex; align-items: center; justify-content: center; min-height: 42px; margin-bottom: 16px; padding: 8px 14px; color: #ffffff; font-size: 17px; font-weight: 700; background: rgba(255, 255, 255, 0.06); border-radius: 12px; } .gulum-xox__board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; aspect-ratio: 1 / 1; } .gulum-xox__cell { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; height: 100%; min-height: 0; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: clamp(44px, 13vw, 72px); font-weight: 800; line-height: 1; background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 16px; outline: none; box-shadow: none; cursor: pointer; /* * Ölçüyü değiştiren transform kullanılmıyor. * Böylece kutular tıklandığında veya basılı tutulduğunda büyümez. */ transform: none; transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; } .gulum-xox__cell:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.18); transform: none; } .gulum-xox__cell:active, .gulum-xox__cell:focus, .gulum-xox__cell:focus-visible { transform: none; } .gulum-xox__cell:focus-visible { border-color: rgba(168, 85, 247, 0.9); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.22); } .gulum-xox__cell:disabled { opacity: 1; cursor: default; transform: none; } .gulum-xox__cell--x { color: var(--gulum-xox-blue); text-shadow: 0 0 20px rgba(56, 189, 248, 0.38); } .gulum-xox__cell--o { color: #fb71b0; text-shadow: 0 0 20px rgba(236, 72, 153, 0.38); } .gulum-xox__cell--winner { background: rgba(34, 197, 94, 0.2); border-color: rgba(74, 222, 128, 0.55); box-shadow: inset 0 0 24px rgba(34, 197, 94, 0.12), 0 0 18px rgba(34, 197, 94, 0.12); transform: none; } .gulum-xox__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; } .gulum-xox__button { min-height: 46px; margin: 0; padding: 11px 14px; appearance: none; -webkit-appearance: none; color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: 700; line-height: 1.2; border: 0; border-radius: 12px; cursor: pointer; transform: none; transition: opacity 0.18s ease, background-color 0.18s ease; } .gulum-xox__button:hover { opacity: 0.9; transform: none; } .gulum-xox__button:active, .gulum-xox__button:focus { transform: none; } .gulum-xox__button--primary { background: linear-gradient( 135deg, var(--gulum-xox-purple), var(--gulum-xox-purple-light) ); } .gulum-xox__button--secondary { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.1); } @media (max-width: 480px) { .gulum-xox { padding: 24px 12px; } .gulum-xox__container { padding: 24px 16px; border-radius: 21px; } .gulum-xox__board { gap: 8px; } .gulum-xox__cell { border-radius: 13px; } } @media (max-width: 360px) { .gulum-xox__scoreboard { gap: 6px; } .gulum-xox__score-card { padding: 11px 5px; } .gulum-xox__score-label { font-size: 11px; } .gulum-xox__actions { grid-template-columns: 1fr; } } @media (prefers-reduced-motion: reduce) { .gulum-xox__cell, .gulum-xox__button { transition: none; } } (() => { "use strict"; const gameRoot = document.querySelector(".gulum-xox"); if (!gameRoot) { return; } const cells = Array.from( gameRoot.querySelectorAll(".gulum-xox__cell") ); const statusText = gameRoot.querySelector("#gulumXoxStatus"); const newRoundButton = gameRoot.querySelector("#gulumNewRound"); const resetGameButton = gameRoot.querySelector("#gulumResetGame"); const playerScoreElement = gameRoot.querySelector("#gulumPlayerScore"); const robotScoreElement = gameRoot.querySelector("#gulumRobotScore"); const drawScoreElement = gameRoot.querySelector("#gulumDrawScore"); const PLAYER = "X"; const ROBOT = "O"; const winningCombinations = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6] ]; let board = Array(9).fill(""); let gameActive = true; let robotThinking = false; let robotTimer = null; let scores = { player: 0, robot: 0, draw: 0 }; function handleCellClick(event) { const clickedCell = event.currentTarget; const clickedIndex = Number(clickedCell.dataset.index); if ( !gameActive || robotThinking || board[clickedIndex] !== "" ) { return; } makeMove(clickedIndex, PLAYER); const playerResult = checkGameResult(); if (playerResult) { finishGame(playerResult); return; } robotThinking = true; statusText.textContent = "Robot düşünüyor..."; disableEmptyCells(); robotTimer = window.setTimeout(() => { robotMove(); }, 500); } function makeMove(index, symbol) { board[index] = symbol; const cell = cells[index]; cell.textContent = symbol; cell.disabled = true; if (symbol === PLAYER) { cell.classList.add("gulum-xox__cell--x"); cell.setAttribute("aria-label", "X işaretli kutu"); } else { cell.classList.add("gulum-xox__cell--o"); cell.setAttribute("aria-label", "O işaretli kutu"); } } function robotMove() { if (!gameActive) { robotThinking = false; return; } const moveIndex = findBestMove(); if (moveIndex !== null) { makeMove(moveIndex, ROBOT); } const robotResult = checkGameResult(); if (robotResult) { robotThinking = false; finishGame(robotResult); return; } robotThinking = false; statusText.textContent = "Sıra sende"; enableEmptyCells(); } function findBestMove() { const winningMove = findCriticalMove(ROBOT); if (winningMove !== null) { return winningMove; } const blockingMove = findCriticalMove(PLAYER); if (blockingMove !== null) { return blockingMove; } /* * Oyuncunun çatal oluşturmasını engellemeye çalışır. */ const playerForks = findForkMoves(PLAYER); if (playerForks.length === 1) { return playerForks[0]; } if (playerForks.length > 1) { const sideMove = getRandomItem( [1, 3, 5, 7].filter(index => board[index] === "") ); if (sideMove !== null) { return sideMove; } } const robotForks = findForkMoves(ROBOT); if (robotForks.length > 0) { return getRandomItem(robotForks); } if (board[4] === "") { return 4; } const oppositeCorners = [ [0, 8], [2, 6], [6, 2], [8, 0] ]; for (const [playerCorner, oppositeCorner] of oppositeCorners) { if ( board[playerCorner] === PLAYER && board[oppositeCorner] === "" ) { return oppositeCorner; } } const emptyCorners = [0, 2, 6, 8].filter( index => board[index] === "" ); if (emptyCorners.length > 0) { return getRandomItem(emptyCorners); } const emptySides = [1, 3, 5, 7].filter( index => board[index] === "" ); if (emptySides.length > 0) { return getRandomItem(emptySides); } return null; } function findCriticalMove(symbol) { for (const combination of winningCombinations) { const values = combination.map(index => board[index]); const symbolCount = values.filter( value => value === symbol ).length; const emptyCount = values.filter( value => value === "" ).length; if (symbolCount === 2 && emptyCount === 1) { const emptyPosition = values.indexOf(""); return combination[emptyPosition]; } } return null; } function findForkMoves(symbol) { const forkMoves = []; board.forEach((value, index) => { if (value !== "") { return; } board[index] = symbol; let possibleWins = 0; for (const combination of winningCombinations) { const values = combination.map(cellIndex => board[cellIndex]); const symbolCount = values.filter( cellValue => cellValue === symbol ).length; const emptyCount = values.filter( cellValue => cellValue === "" ).length; if (symbolCount === 2 && emptyCount === 1) { possibleWins++; } } board[index] = ""; if (possibleWins >= 2) { forkMoves.push(index); } }); return forkMoves; } function getRandomItem(items) { if (!items.length) { return null; } const randomIndex = Math.floor(Math.random() * items.length); return items[randomIndex]; } function checkGameResult() { for (const combination of winningCombinations) { const [a, b, c] = combination; if ( board[a] !== "" && board[a] === board[b] && board[a] === board[c] ) { return { winner: board[a], combination }; } } if (!board.includes("")) { return { winner: "draw", combination: [] }; } return null; } function finishGame(result) { gameActive = false; robotThinking = false; window.clearTimeout(robotTimer); disableAllCells(); if (result.winner === PLAYER) { scores.player++; statusText.textContent = "Tebrikler, kazandın!"; } else if (result.winner === ROBOT) { scores.robot++; statusText.textContent = "Robot kazandı!"; } else { scores.draw++; statusText.textContent = "Oyun berabere bitti!"; } result.combination.forEach(index => { cells[index].classList.add("gulum-xox__cell--winner"); }); updateScoreBoard(); } function disableEmptyCells() { cells.forEach((cell, index) => { if (board[index] === "") { cell.disabled = true; } }); } function enableEmptyCells() { cells.forEach((cell, index) => { if (board[index] === "") { cell.disabled = false; } }); } function disableAllCells() { cells.forEach(cell => { cell.disabled = true; }); } function startNewRound() { window.clearTimeout(robotTimer); board = Array(9).fill(""); gameActive = true; robotThinking = false; statusText.textContent = "Sıra sende"; cells.forEach((cell, index) => { cell.textContent = ""; cell.disabled = false; cell.classList.remove( "gulum-xox__cell--x", "gulum-xox__cell--o", "gulum-xox__cell--winner" ); cell.setAttribute( "aria-label", `${index + 1}. boş oyun kutusu` ); }); } function resetGame() { scores = { player: 0, robot: 0, draw: 0 }; updateScoreBoard(); startNewRound(); } function updateScoreBoard() { playerScoreElement.textContent = scores.player; robotScoreElement.textContent = scores.robot; drawScoreElement.textContent = scores.draw; } cells.forEach(cell => { cell.addEventListener("click", handleCellClick); }); newRoundButton.addEventListener("click", startNewRound); resetGameButton.addEventListener("click", resetGame); })();