🧩 Tic Tac Toe - Game Board Extension for Multiplayer by Havham Apps

Create a fully customizable, multiplayer-ready Tic Tac Toe game inside your Kodular apps.


:package: Features

  • Supports placing X and O both manually and by touch.
  • ShouldAcceptResponses to control if board should accept user touches.
  • Set and get the entire board using CSV (for online multiplayer sync).
  • Automatically detects wins and draws.
  • Clean, responsive UI layout.
  • Compatible with Android 7+.

:books: Blocks Documentation


:blue_square: Initialization

Initialize(component)

component_method

Initializes the game board inside a visible layout (e.g., HorizontalArrangement).

  • Parameter: component: Layout where the game board should be drawn.

:1234: Symbol Control

SetActiveSymbol(symbol)

component_method (1)

Sets the current symbol to be placed on touch.

  • Input: "X" or "O"

GetActiveSymbol() β†’ String

component_method (2)

Returns the currently active symbol.


:writing_hand: Manual Placement

PlaceX(row, column)

component_method (4)

Manually places "X" at the given row and column (0-based).

PlaceO(row, column)

component_method (3)

Manually places "O" at the given row and column (0-based).


:counterclockwise_arrows_button: Board Management

ResetBoard()

component_method (5)

Clears the game board completely.

GetCellValue(row, column) β†’ String

component_method (6)

Returns the symbol at a given cell (empty string if cell is empty).


:repeat_button: Board Sync (Multiplayer)

SetBoardFromCSV(csv)

component_method (8)

Sets the entire board from a comma-separated string of 9 symbols.

  • Example: "X,O,X,,O,,,X,O"

GetBoardAsCSV() β†’ String

component_method (7)

Returns the board as a comma-separated string (row-major).


:white_check_mark: Game Flow Control

ShouldAcceptResponses β†’ Boolean (Property Getter)

component_set_get

Returns whether the board currently accepts touches.

ShouldAcceptResponses(accept) (Property Setter)

blocks (2)

Sets whether the board should accept touches.

  • Input: true or false

:police_car_light: Events

OnCellPlaced(row, column, symbol)

component_event (1)

Fires when a symbol is placed on the board via user touch.

  • Parameters:
    • row: 0–2
    • column: 0–2
    • symbol: "X" or "O"

OnGameWon(winnerSymbol)

component_event (2)

Fired when the game detects a win.

  • Parameter: "X" or "O"

OnGameDraw()

component_event (3)

Fired when all cells are filled and no winner is found.


:hammer_and_wrench: Notes

  • Uses responsive GridLayout for full compatibility with all screen sizes.
  • Runs all UI updates on the main thread for stability.
  • Make sure the layout used with Initialize() is visible and has defined height/width.

Downloading and Usage

  • AIX

    TicTacToe.aix (14.5 KB)

  • AIA (Updating Soon)

  • How to Use (Updating Soon)


:outbox_tray: Publishing & License

Created by Havham Apps

  • :date: Version: 1.0
  • :mobile_phone: Android Minimum: 7.0 (API 24)
  • :shield: Free for personal and commercial use (credit appreciated)

I know there are already many Tic Tac Toe extensions available in the community, but I’m excited to share my first ever extension β€” built with love and fully compatible with multiplayer sync features.

Whether you’re building an online game or just want a clean, modern game board for your app, this extension is simple, powerful, and made to fit right into your project.

Let me know what you think β€” feedback is always welcome! :blush:

3 Likes