Tic tac toe: Pebble & Petal

Pebble & Petal is tic tac toe against an easy or hard computer, or a friend on the same device.

Genre
Puzzle
Players
1 or 2 on the same device
Works on phone
Yes
Length
Up to nine moves a round

Make a game like this with Claude Code

How to play

  • Choose Hard computer, Easy computer or Two players here. Against the computer, choose X to move first or O to move second.
  • Tap or click an empty square. Make a row, column or diagonal of three matching marks to win. A gold line of squares marks the winning three.
  • Next round clears the board and keeps the score. Reset scores starts again at zero. Changing opponent or mark also resets the score.

Tips

  • Look for a winning move before blocking. Finishing your own three ends the round immediately.
  • Watch for forks: two different lines that will both win on the next turn. A corner can set one up, so check both diagonals before you answer.
  • A draw against Hard is a good result. Try playing as O too: the computer starts from the center when it has the first turn.

About Pebble & Petal

Pebble & Petal is played on nine squares at a garden table. The green X and peach O keep the two sides distinct, while a winning line turns gold. The board starts empty and X always goes first. If all nine squares fill without three in a row, the round is a draw.

Easy chooses an empty square at random. Hard searches the remaining moves and answers with a move whose best possible result is a win or draw. You can take either mark against it, so the computer can start or follow. Two-player play simply alternates X and O on the same screen.

The scoreboard separates X wins, draws and O wins. It carries across rounds while the page stays open. Our rule check followed every legal human continuation against Hard: 152 completed games when the computer played X and 635 when it played O, with zero computer losses in either set.

Can you beat the hard computer at tic tac toe?

Hard has no losing reply sequence in our exhaustive rules check. As X it finished 142 wins and 10 draws; as O it finished 482 wins and 153 draws. Those counts include every legal human continuation against its chosen moves.

What is the difference between easy and hard?

Easy chooses a random empty square. Hard searches the remaining board positions before choosing, so it can block a fork and take a win when one is available.

Can two people play on one phone?

Yes. Choose Two players here and take turns tapping the board. Both players use that one screen.

About the rules and tools

Software credits

How this game was made

The hard opponent was checked as both X and O against every legal human continuation: 787 completed games and zero losses. The same check verifies all eight winning lines, drawn boards and legal easy-mode choices.

This was the prompt:

Make an original tic tac toe game called Pebble & Petal on the puzzle starter. Use a garden-table look, easy and hard computer opponents, hard never loses, or two people on one device. Highlight the win line, keep score across rounds and support touch. Let the human choose X or O.
Four-game build
5.8 minutes
Model cost
Not reported
Game file
8.0 kB

OpenAI Codex wrote these games using the kit's puzzle starter and builder. The clock covers all four games from setup to their first compiled builds and passing rules checks. Codex session pricing was not supplied by the runtime. Open the build measurements.

Make one like this

One email a week. Unsubscribe anytime.