what happens if the random function in computer moves picks a already filled space?
@shinayang-um7mk
5 ай бұрын
1:51
@SalKulti
Ай бұрын
Why was !number used instead of just the norma, number 0?
@andarling9742
Жыл бұрын
u could check winner by creating an an array of playermoves and check if there are 3 numbers that when num1 - num2 = num2 - num3 && num1-num2
@narayanswamyghanta315
11 ай бұрын
Looking at this game code, I understood that i lack in algorthimic thinking.
@guillermofrancella08
3 ай бұрын
Bro is back with the Code. Love you man.
@user-cl5zq6qs9f
Ай бұрын
so good bro...
@ra2dsla7
2 жыл бұрын
could u please explain the condition in details (!number > 0 || !number < 8)?
@shintiao1732
Жыл бұрын
@koji is not the same, you try input the same number in player and you will know that.
@ali_gd_0161
Жыл бұрын
Think of it as ( !(number >0) || !(number < 8) The ! Operator changes the boolean value of the condition in front of it. E.g if it's true it becomes false
@nicko4140
Жыл бұрын
@@ali_gd_0161 im confused how it loops after you select a non empty space. is the !number>0 || !number
@hupmitom5509
Жыл бұрын
number = 1 the logic is the same. I think it is easier to understand.
@BroDevsRBLX
9 ай бұрын
It just means as long as the number is 8 the loop will execute@@Kak-koi
@havocblast8737
2 ай бұрын
I ended up taking this idea an started working on a terminal submarine hunting game where you are trying to sink a submarine that is hiding/moving around under the water. I do need to figure out how to make drawing the board faster since I am using colors to print a grid of blue spaces in the terminal for the water. Board is currently 40 by 80. Thanks for bringing me down that rabbit hole lol
@FrederikWollert
4 ай бұрын
Good Video Bro.
@user-xk7de1jw8g
11 ай бұрын
Bro, I have a question for you. Look, we did implement the minimax algorithm in Python and create an AI Tic Tac Toe player that is invincible. However, in C++ it's a daunting task for me. Can you help me implement the minimax algorithm in C++?
@Mirage_3253
Ай бұрын
you said originally you would have used switch statements but I thought they could only be used with ints
@shintiao1732
Жыл бұрын
if we never use the "char computer" in cheakWinner function ,why need to import this parameter?
@anvrag
Жыл бұрын
for fun..
@kshitijsrivastava8312
Жыл бұрын
For me its showing an exception report after performing the code, telling its a bug.
@gamsterilyass2952
3 ай бұрын
Assembly ?
@triculex2854
Ай бұрын
while(!num>0 || !num
@diosinvicto
13 күн бұрын
I hate a double negation😂😂.... But this one's better while(number < 0 || number > 8)
@jessechen2132
Жыл бұрын
When a user enters a letter rather than a number, the program crashes. Do you know how to solve it?
@anvrag
Жыл бұрын
std::cin.clear(); fflush(stdin); use this two lines of powerful code which will help u to prevent crashes (use it below the input)
@FlorrioEggGaming
Жыл бұрын
@@anvrag truly powerful code
@Toothless_Rides
6 ай бұрын
@@anvrag how? when I coded this in, it became an infinite loop...
Пікірлер: 42