Code Tic Tac Toe in Java
HTML-код
- Опубликовано: 15 июл 2023
- How to code a Tic Tac Toe game in Java for beginners! Learn how to create a game of Tic Tac Toe in Java using the awt and swing graphics library. Throughout the tutorial, you will learn how to create a graphical user interface (GUI) to display the Tic Tac Toe game, and check win or tie conditions using a 2D array.
Setup Java with Visual Studio Code:
• How to set up Java in ...
Code: github.com/ImKennyYip/tictact...
Website: www.kennyyipcoding.com/
Java Game Programming Projects Playlist:
• Java Game Programming ...
JavaScript Game Programming Projects Playlist:
• JavaScript Game Progra...
Subscribe for more coding tutorials 😄!
Thank you for your effort Kenny , this is a very good tutorial for an average programmer. Please keep up the good work like this one. I have subcribed recently and watching all of your prev. tutorials
Yeahhhh 🎉 thank you kenny. Pls be continue in java projects...
Very useful tutorial. The thing I like about the video is , each line of the code you explained what it does.
Help me plz about tile in 12 minute on video. I do not write “tile” because I have an issue😢
keep up man uare the best keep going i'm learning so much from you
you could also - to keep the code as much the same as possible change setWinner for anti-diagionally to this:
for (int i = 0; i
you are a king i have no idea how to code and i just made a game
Great video, very clear. I am going to try to modify your code to where the computer can play one of the players. I have seen it done in Python so I will try in Java.
Thanks for the tutorial :-)
Amazing!
Super underrated
does this code work in ide on cellphone? like Jvdroid?
Thanks
very cool explanation! Will there be more JavaScript content? will there be any JavaScript tutorials or maybe you will understand the algorithms and Data Structures in JavaScript? And yet, can I contact you personally, write to you?
Yes, there will be more JavaScript content in the future. Currently I’m just taking some time to focus on Java so that I can expand my content to those who prefer coding in Java. But I will continue to upload JS content
Unfortunately, I don’t do personal one on ones but I usually reply to comments/questions on my videos
please tell me where did you learn javascript? maybe you can advise some literature on this programming language to read?! you really are the best at explaining anyone I've seen on RUclips!!!!
next time please add the replay button. im currently following your all game tutorial. so it will be very helpful.
I assume people will follow the tutorial to learn and later improve on the project. I purposely left out the replay button so that it would be something for you to figure out on your own.
Shouldn't be too difficult since following the tutorial will teach you how to add a button, add an action listener to that button when clicked, and at the end of the video I also identified which variables you should update when resetting the game.
Why my Inteliji IDE has not see "tile"? on 12m14sec. Help me plz!!!!
How to fix it?
In java compiler main class" Public static void main (String [] args ) not found error is getting ?.
Solution plz🙏
Are you using vs code?
@@KennyYipCoding .
No i am not using vs code...
Will it work on it???
@@GodStories1306 no, it’s not necessary, but do you have a file with the main function?
Why I can't see code on your site????
The GitHub link is in the video description
Sombody have a restart button?😢
playerX ? playerO : playerX;
I've never seen this kind of code before. what is that mean? sorry, im a begginer of Java.
it is the ternary operator syntax,
you can mentally read the syntax like so:
currentPlayer = is (currentPlayer == playerX) ? set to playerO : else set to playerX
this syntax is shorthand for the following:
if (currentPlayer == playerX) {
currentPlayer = playerO;
} else {
currentPlayer = playerX;
}
@@KennyYipCoding Thank you for the explanation!