etian vizoso
@etian
Whats a Doggo?????
if anyone has the chance, could they do some tests on my program to make sure everything runs smoothly?
C++
aywatson There shouldn't be any problems. These forums are pretty helpful if you're encountering any issues regarding software. My dream is to create something like https://www.qacoverage.com/ in order to help people with different management tools. I know how annoying it can be to not have the proper tools for your job. Too many people are underestimating the importance of people who're working in the software domain since the customer sees only the front end of the final product. Thankfully, the intern2 years ago
So I tried to use a for loop to check win and from logic stand point it should've worked but it didn't.Then I tried using ifs for all the combination
C++
Highwayman Well... you deleted your code that you were using. Could you give us your implementation that wasn’t working? We could discuss what is going wrong with that, or we could discuss the reimplementation of the function, your pick.3 years ago
mwilki7 My first approach would be just to brute force it and check for all possible win scenarios.
pseudocode
function checkWin(matrix)
{
if first row has all X's or O's
return win // same for 2nd and 3rd row
if diagonal has all X's or O's
return win
if other diagonal has all X's or O's
return win
return nowinyet
}
`3 years ago
So as no one knows, for school I've been working on a tic tac toe game and its pretty fun! I tried doing some coding now but I look through all the co
C++
Robotechnolgy c++ always makes things more difficult, I used js and I got a ai that I never was able to beat.3 years ago
I fixed the number game made by mewant_taco cause no offense, but its rigged
C++
sharpoen i looked at the code of mewant taco's game, and the numbers are always the same, there is not even a bot at all just 11 minus your choice.3 years ago
How do I make random thats not Rand() because Rand() only gives you the same number if you ask for it once. Thanks in advance.
C++
hyperupcall hey!
so i will add that the numbers rand() generates is based on what is called to he srand() function.
if you do not call srand at all, then it is essentially the same as calling srand(1). So, every time you run the program, 'random' numbers are based from the seed 1.
to change this, simply pass in a value to srand that will be different each time you run the program, like the current time. Because this makes the seed different, you will get different random numbers each time you run the pro3 years ago
I'm super bored so if anyone has any not too complex (i'm not a pro) to do?
if you do, amazing.
P.s c++
:)
Im so close to finishing this but idk y its not working. pls help
C++
Highwayman you can use 'x % y' to see if x is divisible by y. (% means mod, which is basically just finding the remainder)3 years ago
I've been doing only c++ & wanna start learning Python but I have no idea where to start. Any advice??
mwilki7 Redo some of your C++ projects in python. If you don't know how to do something then google should help.3 years ago
PaoloAmoroso I maintain a list of free Python books, which also includes introductory guides.3 years ago
Giothecoder And you also have to give it a name so like
#include
int main(){
std::string str = "cats";
}
`3 years ago
this isn't mine i just forked it, also doesn't have to be the same theme & can be whatever language
So i got tired of people saying "i organized your code," helpful.. but tiring.
C++
MatthewDoan1 // This is a useful statement. Statements that start with #include allow access to useful libraries that you can use in your program!
#include
// This is the entry point of your code.
int main()
{ // This is the opening of the main method.
std::cout << "Hello World!\n" // This displays Hello World to the console. The \n tells the computer to display a new line.
} // And this curly brace closes the main method.
`3 years ago
Syrup is good for plants.
how do i make it pause so that I'm able to let the user actually see the countdown??
ash15khng You need to do a sleep function by first importing unistd.h then using the usleep() function:
#include
// code.....
cout << 5;
usleep(1000000); //sleeps for 1 second (1000000 microseconds)
cout << 4;
`4 years ago
how do you make it so that it would stop running after they get the password correct ?
ahkid7674 var password = #correct-Answer
var run = True
while run == True:
#insert code here
if password == #correct-answer:
run = False
break
python ^
2 years ago
Highwayman Return 0; will end the program. So just stick it at the end of the if statement, but I think you might want to introduce a loop to that program too. (Entirely unrelated though)4 years ago