Tic Tac Toe Android Studio Kotlin Tutorial | Noughts & Crosses

  Рет қаралды 23,951

Code With Cal

Code With Cal

Күн бұрын

How to build a tic-tac-toe game using Kotlin and Android Studio. In this beginner app tutorial we build a simple game of noughts and crosses or tic tac toe.
Build this basic, yet fun game in less than 10 minutes. Improve your understanding of weighted linear layouts, constraint layouts, game logic, enums, view bindings and much more
Tic Tac Toe Source Code:
github.com/codeWithCal/TicTac...
⏱️ TIMESTAMPS ⏱️
00:00 - Intro
00:30 - XML Layout
03:54 - View Binding
04:04 - Place Nought/Cross
06:25 - Reset Draw
07:37 - Victory
#AndroidStudioKotlin #AppDevelopment

Пікірлер: 29
@vedantk23
@vedantk23 2 жыл бұрын
Best video on Tic Tac Toe game built using Kotlin in KZfaq. Keep it up Cal Sir.
@greylabservice444
@greylabservice444 Жыл бұрын
The big grateful from Kazakhstan! You are the best!
@mysgrown
@mysgrown 2 жыл бұрын
Thank you so much Cal Sir. Your videos are very helpful 💌
@sourabhjadhav4621
@sourabhjadhav4621 2 жыл бұрын
Good Video Man. Love to see more!
@mrtruthvirtue8752
@mrtruthvirtue8752 3 жыл бұрын
Hi , Cal.. You're amazing. Pls don't give up , okey?
@preetthee
@preetthee 2 жыл бұрын
Nice explaining. Keep it up.
@bigbad123321
@bigbad123321 Жыл бұрын
Thank you so much. I needed this for a University module I'm doing. I just have to add additional features to it now, which shouldn't be too bad. If I can work a quarter as quickly as you one day I'll be happy.
@mokshpatel3108
@mokshpatel3108 11 ай бұрын
Hii bro I require it for the same can you please help me how to download it using source code 😿😿
@SpideyCents
@SpideyCents 2 жыл бұрын
love it
@BitMavrick
@BitMavrick Жыл бұрын
Hey Cal, I think you should make a playlist about layout design using XML, I saw lots of KZfaq tutorials but I'm not able to find any proper playlist for learning layout or android UI design using XML. Thank you.
@zhbeka9732
@zhbeka9732 Жыл бұрын
Why my boardTapped function wasnt created automtically?
@reliefsounds1
@reliefsounds1 Жыл бұрын
I have problem in online that show layout margin not found
@kamalCode
@kamalCode 3 жыл бұрын
Sir, please JetPack kotlin complete advanced tuotorial updated with Ecommerce ui design
@manvendrasingh5629
@manvendrasingh5629 Жыл бұрын
Hi, as soon as I am clicking on board the application is minimising automatically
@IksanArisandi
@IksanArisandi 5 ай бұрын
thanks for the code, may I use it for commercial purposes ?
@marcinaszyk8387
@marcinaszyk8387 2 жыл бұрын
If the win happens at the last move, there is a draw and win at the same time ;) great video!
@CodeWithCal
@CodeWithCal 2 жыл бұрын
😉
@aritrps1866
@aritrps1866 2 жыл бұрын
Lâu quá rồi mới nghe anh Đức Phúc hát, thích quá đi thôi.
@Ep3o
@Ep3o 6 ай бұрын
Hey! For those finding this tutorial, you may need to change up the "fun boardTapped(view: View)" function, as it no longer works in the current version (literally crashes if you press anything) My work around was setting each button like so in the oncreate function: binding.a1.setOnClickListener(this) binding.a2.setOnClickListener(this) etc. Then create override fun onClick(v: View?) { addToBoard(v as Button) } instead of the "fun boardTapped(view: View)" function be sure to also add: class MainActivity : AppCompatActivity(), View.OnClickListener {
@Ep3o
@Ep3o 6 ай бұрын
Also, to get around draw popping up if you fill-up the board but also win I changed: override fun onClick(v: View?) { addToBoard(v as Button) var victory = false if(checkForVictory(NOUGHT)){ victory = true noughtsScore ++ result("Noughts Win!") } if(checkForVictory(CROSS)){ victory = true crossesScore ++ result("Crosses Win!") } if(fullBoard()) { if (victory == false) { result("Draw") } }
@Ep3o
@Ep3o 6 ай бұрын
Hopefully this can save someone new hours, Kotlin having frequent updates rendering old tutorials useless has made my life hell
@sadpoetry2135
@sadpoetry2135 3 жыл бұрын
hy call need help me plz i have a make to prayer times list in andoid st
@CodeWithCal
@CodeWithCal 3 жыл бұрын
A list view application? kzfaq.info/get/bejne/bNeJgdulrJawfnk.html
@bestiegreatie8752
@bestiegreatie8752 2 жыл бұрын
unresolved error for me
@amitabhkumar7671
@amitabhkumar7671 Жыл бұрын
I am unable to find activity main binding in my syste,
@CodeWithCal
@CodeWithCal Жыл бұрын
Have you enabled view binding in the build Gradle?
@imaginedave4094
@imaginedave4094 7 ай бұрын
@@CodeWithCal Same with me, i enabled it and somehow it still shows "unresolved reference" i actually tried everything and it doesnt work
@SumoPixelPlay
@SumoPixelPlay Жыл бұрын
Bro how to make games
@CodeWithCal
@CodeWithCal Жыл бұрын
Google. :P
CardView in RecyclerView Android Studio Kotlin Tutorial
10:04
Code With Cal
Рет қаралды 21 М.
I Made Minecraft Realistic
11:22
mysticat
Рет қаралды 3,5 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 29 МЛН
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 12 МЛН
Calculator App Android Studio Kotlin Tutorial
12:22
Code With Cal
Рет қаралды 73 М.
How to Make a Tic Tac Toe Game in Android [Java 2020]
39:31
CodeWithMazn
Рет қаралды 60 М.
Android ViewBinding in 8 Minutes
8:59
Philipp Lackner
Рет қаралды 76 М.
Web API Android Studio Kotlin Tutorial | REST
10:23
Code With Cal
Рет қаралды 19 М.
Preferences DataStore in 10min (SharedPreferences deprecated)
11:14
Philipp Lackner
Рет қаралды 73 М.
How to Build & Deploy an Online Tic Tac Toe With Ktor And Web Sockets
2:01:20
Kotlin - ⭕️ ❌ How to make a simple Tic Tac Toe Android Game
24:43
Usmaan Developer
Рет қаралды 12 М.