[Free/Paid] TicTacToe Extension: creates a fully functional Tic Tac Toe game 3x3 or 4x4

TicTacToe Extension


Version: 9
Category: Extension
Visibility: Non-Visible
Developer: Idriss (using Fast-CLI, adapted for Kodular)
Size: 23Kb
Date: March 27, 2025
Update: March 30, 2025

๐Ÿ”น Overview

TicTacToe Extension is a powerful and versatile extension for Kodular that brings a fully functional Tic Tac Toe game to your apps. Featuring a sleek 3x3 or 4x4 grid with customizable square buttons, it supports custom X and O images, background options, and an AI bot with three difficulty levels (Noob, Medium, Pro). Perfect for Player vs. Player (PvP) and Player vs. Bot (PvB) modes, this extension is designed for developers looking to integrate an engaging, interactive game into their projects with ease!


โœ… Key Features

  • ๐ŸŽจ Customizable Design: Adjust button colors, text colors, and background color/image.
  • ๐Ÿ–ผ๏ธ Image Support: Use custom X and O images from assets for a personalized look.
  • ๐Ÿค– Smart AI Bot: Select from three difficulty levels (Noob, Medium, Pro) for single-player fun.
  • ๐Ÿ“Š Score Tracking: Monitor X wins, O wins, and draws with event-based feedback.
  • ๐ŸŽฌ Smooth Animations: Enjoy button click animations for an enhanced user experience.
  • ๐ŸŽฎ Flexible Gameplay: Supports PvP and PvB modes with 3x3 and 4x4 board options.
  • ๐Ÿ›ก๏ธ Click Protection: Locks moves after each click to prevent glitches and ensure fair play.
  • ๐Ÿ“ฑ Universal Phone Support: Adapts seamlessly to all phone screen sizes.

๐Ÿ› ๏ธ Functions & Usage

:small_blue_diamond: Core Properties:

  • SetButtonColor(int color): Sets the default button background color.
  • SetTextColor(int color): Sets the text color for X/O when images aren't used.
  • SetBackgroundColor(int color): Sets the game background color.
  • SetXImage(String path): Assigns a custom X image from assets.
  • SetOImage(String path): Assigns a custom O image from assets.
  • SetBackgroundImage(String path): Sets a background image from assets.

:small_blue_diamond: Setup & Display:

  • Create(VerticalArrangement component, BoardType boardType): Builds the game board (3x3 or 4x4) in a VerticalArrangement.
  • RestartGame(): Resets the board and scores to start a new game.
  • GameFinished(String lastWinner, int xScore, int oScore, int ties): Event triggered when a game ends, providing winner and score details.

:small_blue_diamond: Customization:

  • EnableBot(boolean enable): Toggles the bot (O player) on or off.
  • SetBotLevel(BotLevel level): Sets bot difficulty to Noob, Medium, or Pro.
  • IsBotEnabled(): Returns true if the bot is active, false otherwise.
  • ConfigurePlayer(PlayerSymbol symbol, StartOption startOption): Sets player symbol (X or O) and starting mode (Player, Bot, or Auto).

:small_blue_diamond: Events:

  • ButtonClicked(int position): Triggered when a button is clicked, returning its position.
  • GetCurrentTurn(String currentTurn): Fired after each move or reset, indicating whose turn it is.

๐Ÿ“Œ How It Works (Step-by-Step Guide)

  1. Step 1: Import the TicTacToe Extension (.AIX) into your Kodular project.
  2. Step 2: Customize it using SetButtonColor, SetXImage, etc.
  3. Step 3: Optionally enable the bot with EnableBot and set its level with SetBotLevel.
  4. Step 4: Use Create with a VerticalArrangement and specify board size.
  5. Step 5: Handle events like GameFinished and GetCurrentTurn for game flow and results.

*** Example Blocks


Below are example blocks showing how to use TicTacToe Extension in your Kodular project:

Description: This example sets up a Tic Tac Toe game with a bot at "Medium" difficulty, custom X/O images, and triggers the GameFinished event to display scores.


*** Video Test

Watch the video below to see TicTacToe Extension in action:

Description: This example sets up a Tic Tac Toe game with a bot at "Medium, Noob, Pro" difficulty, and triggers the GameFinished event to display scores.


๐Ÿ”” Events & Error Handling

  • GameFinished(String lastWinner, int xScore, int oScore, int ties): Fired when the game ends, returning the winner and scores.
  • ButtonClicked(int position): Fired on button clicks, returning the clicked position (0 to board size - 1).
  • GetCurrentTurn(String currentTurn): Indicates whose turn it is (e.g., "Player", "Bot", "Player X").

Note: Ensure the game ends (win or draw) for GameFinished to return values.


๐Ÿš€ Why Use This Extension?

โœ… Engaging Gameplay: Brings a fun Tic Tac Toe experience to your app.
โœ… Highly Customizable: Matches your appโ€™s style with extensive design options.
โœ… Easy to Integrate: Simple blocks and events for fast setup.
โœ… Versatile Modes: Offers PvP and PvB with multiple board sizes.

๐Ÿš€ Over 15 Blocks ๐Ÿš€

ButtonClicked_Event
ConfigurePlayer_Method
Create_Method
EnableBot_Set_Property
GameFinished_Event
GetCurrentTurn_Event
IsBotEnabled_Method
LicenseKey_Set_Property

RestartGame_Method
SetBackgroundColor_Set_Property
SetBackgroundImage_Set_Property
SetBotLevel_Method
SetButtonColor_Set_Property
SetOImage_Set_Property
SetTextColor_Set_Property
SetXImage_Set_Property


:link: APK TEST (.APK):

TicTacToeKODULAR.apk (4.6 MB)


Version: 9
Category: Extension
Visibility: Non-Visible
Developer: Idriss (using Fast-CLI, adapted for Kodular)
Size: 23Kb
Date: March 27, 2025
Update: March 30, 2025

Extension Support for Latest Kodular Update

๐ŸŽ‰ Enjoy using TicTacToe Extension! Share your feedback & suggestions below. ๐Ÿš€

๐Ÿ’ฐ Purchase TicTacToe Extension: Get the full version of TicTacToe Extension for just 3 USD via PayPal. If you canโ€™t afford it, Iโ€™ll provide it freeโ€”contact me! Click below to pay:


PayPal

๐Ÿ“ฉ After Payment: Reach out via Telegram or email with payment details to receive your extension file.

Telegram: @IdrissCAma

2 Likes

Thank you for your contribution
Please let us know, which API or library you are using and credit the author

Taifun

1 Like

Thanks for your feedback! I made the TicTacToe Extension using Fast-CLI. No other APIs or libraries were used just basic Android, I wrote the game code myself with Fast-CLI. Thatโ€™s it!

2 Likes

Whatโ€™s New in Version 8

  • Click Protection: Fixed a problem where clicking two buttons at once could mess up the game. Now, it locks after each click so only one move happens at a time, making it fair and smooth.
  • Phone Size Support: Added support for all phone sizes, so the game looks good and works well no matter what device youโ€™re using.
1 Like