[FREE/PAID] TicTacToe Extension

Tic Tac Toe Extension

Hello everybody this is Horizon and today I am back with my new extension called TicTacToe. Using this extension you can make TicTacToe application

Blocks

v1.0

Designer Properties

mit designer

AIX :-
io.horizon.tictactoe.aix (20.7 KB)


v1.2

image

AIX :- This version was removed


✨ v2.0 Update ✨

Hey everyone, So TicTacToe Extension is back with a new update,

This update is quite important and better because Yes, now you guys can make online TicTacToe game with this easily with Firebase Realtime Database


v2.0

So let's see the new blocks and the new aix file

But first, let's see the index system of the extension

image

So in the indexes 1st number represents the row and 2nd represents the column

Now the are the new blocks

image

image
When the X will be placed then its index will be returned

image
When the O will be placed then its index will be returned

image
You can't place any character X or O to any index according to you
I have made this type of system because then the whole Tic Tac Toe board will be filled up by only Xs and Os. To prevent this I have made a system and fore example if someone will place X then it will get to know automatically that we have to place O to some specific index which will be specified through the row and col in the block (If you didn't get it then you can message in the topic, I'll try to make it more clear)

image
These two blocks can help you to close the view and open the view. This specially helps in creating online game.
CloseView doesn't remove the view or hide it. It just locks the view basically, that is, untill unless the view is opened by OpenView block Tic Tac Toe board won't function.


I'll share the apk of online Tic Tac Toe game with you soon, so Stay Tuned! :wink:

Friends if you would like to buy this extension then please pay me and DM me the screenshot, I'll share the file to you in the DM

Price: ₹ 250 INR or $ 5 USD

Thank You :blush: :heart:

AIA :-
TicTacToe.aia (23.4 KB)

DEMO

Credits
I am so much thankful to @Pradevel, @Aarush_Kumar and @Know_About_IT
And special thanks to @shreyash for his great Rush

Donate

If you liked the extension then please don't forget to give this topic :heart:

Thank You

17 Likes

good extension :smiley:

3 Likes

Thank you @AyProductions

3 Likes

you're welcome

Open Source
This extension is now open source

Thank you

4 Likes

Nice extension @Horizon

2 Likes

Thank you @Pradevel

Nice Work!!

1 Like

Coooooool👍

1 Like

Very good extension

1 Like

Great work !!! :exploding_head:

1 Like

Thank you @Aarush_Kumar, @Know_About_IT, @Faraz_Firoz, @Aquib_Khan

6 Likes

@Horizon It would better if you add these blocks
Set O on index=2
Set X on index=1

1 Like

I am sorry @Faraz_Firoz I didn't get you
Will you please elaborate

Add a block to set X or O with blocks

1 Like

@Horizon, @Faraz_Firoz means that add the ability to customize the TicTacToe board, X, O letters. Because always that style will not fit the app :wink:

Btw great extension :heart:

and happy saraswati puja!
2 Likes

Actually I have talked to Faraz and he said that he want a feature to return the index of the place where the x or o is placed so that it is possible to make online game

Yes you can change the color of all these things along with winning line but you cannot change the characters of X or O because i am not using "X" or "O" instead i am making it using programming
If you know java then go through the source code you'll get how exactly i am doing
And i have made it open source for this only so that new learners can understand it

Thank you

4 Likes

If I will make a little bit change in your code then we can use any letters

1 Like

Yes you can try and also I would recommend you to give pull request to the GitHub repo
But i guess it's not possible as you can draw that thing but you cannot change the text size and all

Just change this in TicTacToeBoard.java

private void drawX(Canvas canvas, int row, int col) {
        paint.setColor(XColor);

        canvas.drawLine((float) ((col + 1) * cellSize - cellSize * 0.2),
                (float) (row * cellSize + cellSize * 0.2),
                (float) (col * cellSize + cellSize * 0.2),
                (float) ((row + 1) * cellSize - cellSize * 0.2),
                paint);

        canvas.drawLine((float) (col * cellSize + cellSize * 0.2),
                (float) (row * cellSize + cellSize * 0.2),
                (float) ((col + 1) * cellSize - cellSize * 0.2),
                (float) ((row + 1) * cellSize - cellSize * 0.2),
                paint);

    }

    private void drawO(Canvas canvas, int row, int col) {
        paint.setColor(OColor);

        canvas.drawOval((float) (col * cellSize + cellSize * 0.2),
                (float) (row * cellSize + cellSize * 0.2),
                (float) ((col * cellSize + cellSize) - cellSize * 0.2),
                (float) ((row * cellSize + cellSize) - cellSize * 0.2),
                paint);

    }

You can create your own letter by changing these code. As you do in Canvas component.

1 Like