@Horizon may I know from where onDraw is getting canvas in TicTacToeBoard.java
I am talking about this code
@Override
protected void onDraw(Canvas canvas) {
paint.setStyle(Paint.Style.STROKE);
paint.setAntiAlias(true);
drawGameBoard(canvas);
drawMarkers(canvas);
if (winningLine == true && game.checkDraw == false) {
paint.setColor(winningLineColor);
drawWinningLine(canvas);
if(mlistener != null){
mlistener.gameWinner(game.getWinner());
}
}
}
Also may I know how can I change your code
1 Like
Horizon
February 5, 2022, 1:21pm
22
The view which is created using TicTacToeBoard.java sets up a canvas only and the canvas of onDraw() is returning the canvas which in which you can make changes
You might learn about this(canvas)
Just fork it and clone your repo
Thank You
2 Likes
Horizon
February 5, 2022, 1:23pm
23
See I have made this view therefore i know that which code needs to change to change X and O
But it is not possible for me if you can then try
1 Like
Tomorrow I will give you some code. You need to add those in your code and compile extension
1 Like
I think for adding custom letters it can be done through a image of letter. @Horizon you can take help from -
3 Likes
Horizon
February 5, 2022, 3:42pm
26
I don't know @Aarush_Kumar
Why don't you try by cloning it
1 Like
Well i have exams mostly soon so i dont have time to make extensions for a month or more
1 Like
Horizon
February 5, 2022, 4:12pm
28
Then I'll try making it
#Off topic
BTW All the best for your exams
2 Likes
@Horizon I tried this extension but get the error that says the project was saved in a newer version of MIT App Inventor. I would very much like to use this and don't understand the error.
Horizon
February 6, 2022, 6:48am
30
Just click on ok and wait for 1 min it will be loaded
I did that but it would not run in IDE
@Horizon , there is a Label.Click event in the AIA file.
Horizon
February 6, 2022, 7:55am
33
You can remove this label one click and you can add a new button and say it as reset game and whenever that button will be clicked then you can say that TicTacToe.reset
Which IDE you are talking about
4 Likes
@horizon MIT with companion
Horizon
February 6, 2022, 9:48am
35
Wait for 2-3 hours
I'll make aia from scratch in MIT app inventor nly and then I'll upload it here
Horizon
February 6, 2022, 10:03am
36
Or @gordonlu310 will you please post the aia after deleting that lable click event as I need rest for 2 more days
Horizon
February 6, 2022, 10:09am
38
Thank you @gordonlu310
And I need permission from you that can I add your aia to first post
@Wes_Savage try using this aia