InfiXOX — Full Android Game Source Code (Kotlin + Jetpack Compose + AdMob)

Kotlin Jetpack Compose Material 3 AdMob MVVM

InfiXOX

Complete Android Game Source Code -- Infinite Tic-Tac-Toe with AI Opponent

$14

2,555 lines of Kotlin / 23 files / Published on Google Play

Get Source Code
View on Google Play Store
InfiXOX gameplay screenshot - game board with infinite pieces InfiXOX menu and game modes

InfiXOX is a modern twist on Tic-Tac-Toe with one game-changing rule: each player can only have 3 pieces on the board at a time. When you place your 4th piece, your oldest one vanishes. No more draws. Every game has a winner.

This is the complete source code for the app that's currently live on the Google Play Store. Production-ready, clean architecture, fully documented. Buy it, customize it, publish it as your own.

What Makes This Different

Infinite Pieces Mechanic

Max 3 pieces per player. Oldest piece vanishes when you place #4. Eliminates all draws -- every game ends with a winner.

🤖
7-Level AI Strategy

Smart opponent with fork detection, center control, and strategic corner play. Not random -- actually challenging to beat.

🎨
Jetpack Compose UI

100% Compose with Material 3 dark theme, animated confetti, splash screen animations, and smooth transitions.

💰
AdMob Ready

Full Google AdMob integration with test IDs for debug and production IDs for release. Just swap your ad unit IDs.

Tech Stack

Kotlin 100% Jetpack Compose Material 3 MVVM + StateFlow Coroutines Google AdMob SDK SoundPool Android 9+ (API 28) Target Android 15 (API 35)

Project Structure

app/src/main/java/com/jeripurnama/infixox/
  MainActivity.kt // Navigation: Splash > Menu > Game
  game/
    GameLogic.kt // Win detection, draw logic
    AIStrategy.kt // 7-tier AI decision tree
  model/
    GameModels.kt // Data classes: CellState, Move, GameState
  viewmodel/
    GameViewModel.kt // MVVM state management (StateFlow)
  sound/
    SoundManager.kt // SoundPool + SharedPreferences
  ui/screens/
    SplashScreen.kt // Animated intro
    MainMenuScreen.kt // Solo / Local Duel selection
    GameScreen.kt // Main game UI container
    AdBanner.kt // AdMob banner component
  ui/components/
    GameBoard.kt // 3x3 grid with tap handling
    ScoreBoard.kt // Player scores display
    Confetti.kt // Victory celebration effect
    + 6 more components...
  ui/theme/
    Color.kt, Theme.kt, Type.kt // Material 3 theming
  res/raw/
    cell_tap.wav, winning.wav, game_over.wav

What You Get

Source Code23 Kotlin files, 2,555 lines of clean, readable code
ArchitectureMVVM with StateFlow -- proper separation of concerns
Game ModesSolo (vs 7-level AI) + Local Duel (2-player PvP)
Match SystemBest of 5 rounds with score tracking
UI/UXMaterial 3 dark theme, animations, confetti, sound effects
MonetizationAdMob banner ads with debug/release build configurations
Sound Effects3 WAV files (tap, win, game over) with toggle preference
AssetsApp icon (all densities), vectors, gradients, logo
Build ConfigGradle KTS with version catalog, release signing ready
Play Store ProofCurrently live at com.jeripurnama.infixox
AdMob setup is plug-and-play. The code already has separate ad unit IDs for debug (Google test ads) and release (production ads). Just replace the production IDs in build.gradle.kts with your own AdMob IDs, build a release APK, and publish. Your own monetized game in under an hour.

Who Should Buy This

  • Android developers learning Jetpack Compose -- a complete, real-world Compose app to study and extend. Better than any tutorial.
  • Indie developers who want to publish fast -- reskin the theme, change the app name, swap AdMob IDs, publish on Play Store. Done.
  • Students building a portfolio -- understand MVVM, StateFlow, Coroutines, and game AI through working production code.
  • Anyone who wants passive income from apps -- the AdMob integration is already built. Publish and let banner ads generate revenue.

AI Strategy Deep Dive

The AI opponent uses a 7-tier priority decision tree, not random moves. Here's how it thinks:

Priority 1Win immediately if a winning move is available
Priority 2Block player's win -- don't let the player complete a line
Priority 3Create a fork -- set up 2+ ways to win simultaneously
Priority 4Block player's fork -- prevent the player from creating forks
Priority 5Take center -- strongest strategic position
Priority 6Take opposite corner -- counter the player's corner
Priority 7Random available cell -- fallback when no strategic move exists

Combined with the infinite pieces mechanic (where old pieces vanish), this creates a constantly shifting board where the AI genuinely challenges you. It's not tic-tac-toe as you know it.

How to Customize

Change colorsEdit Color.kt -- all colors in one file (Material 3 theme)
Swap AdMob IDsEdit build.gradle.kts -- replace manifestPlaceholders values
Change app nameEdit strings.xml -- all 80+ strings in one file
Add difficulty levelsModify AIStrategy.kt -- skip priorities for easier AI
Add new game modesExtend GameViewModel.kt -- the state management is modular
Change board sizeModify GameConstants -- designed to be adjustable
Add interstitial adsFollow the same pattern as AdBanner.kt
Publish to Play StoreGenerate your keystore, update build.gradle.kts, build release APK

Frequently Asked Questions

Can I publish this on the Play Store?

Yes. Change the package name, app name, colors, and AdMob IDs. It becomes your app. Many buyers do exactly this.

Do I need to credit the original developer?

No. This is a full source code license. You can use it commercially, modify it, and publish it under your own name.

What Android Studio version do I need?

Android Studio Hedgehog or newer. The project uses Gradle KTS with version catalogs (modern setup).

Is the AdMob integration production-ready?

Yes. Debug builds automatically use Google's test ad IDs (prevents policy violations during development). Release builds use your production IDs. Just swap the IDs in the build config.

Can I add more features?

Absolutely. The MVVM architecture makes it straightforward to add online multiplayer, leaderboards, different board sizes, or in-app purchases. The code is clean and well-structured for extension.

What if I get stuck?

Drop a comment below or reach out. I built this app and I'm happy to help with setup or customization questions.

Get InfiXOX Source Code

2,555 lines of production Kotlin. Jetpack Compose + Material 3 + MVVM + AdMob. Published on Play Store.

Download for $14

Have questions before buying? Drop a comment below -- I respond to every one.

No comments: