#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <string>
using namespace std;
// standard Connect Four board size
const int NROWS = 6;
const int NCOLS =...
Type: Posts; User: fail50
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <string>
using namespace std;
// standard Connect Four board size
const int NROWS = 6;
const int NCOLS =...
can i write by heuristic function???
but after searching by google i have no idea for this
how can i start??
i have already written the connect 4. but i would like to play with (i.e. play with ai)
how can i do that??:(
p.s. i am writing by c++ and in dos only
thank you
this problem fixed already
you mean like this???
int main ()
{
string name1, name2;
logo();
playername(name1, name2);
rules();
displayBoard ();
for (int i = 0 ; i < 15 ; i++)
Please help Me :'( :'( :'(
thanks for your help
now, i can show the names by turns
but there are still some questions.
it can't show which one's turn at the first time
like this :...
how can i show the player by turns???
i.e.ken's turn then hi's turn
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <limits>
using namespace std;
// standard Connect Four...
how can i ask the player to input into the board???
thx!!!
if i have any problems, i will ask you again:)
Now I have some mistake about printing the board.
here is the code
#include <iostream>
#include<string>
#include<iomanip>
using namespace std;
const int maxrow = 6;
const int maxcol = 7;...
i am going to write a connect 4 game with ai. however, i have no idea how to write. would anyone give me some ideas????? i just know i have to use 2d array.
thanks.
Thank You very much!!!!!!!!
The program is done:)
The major problems are solved alreadly.
But there are still some minor problems.
What happen to the numbers I circled.
http://i1128.photobucket.com/albums/m497/fail50/errors.jpg?t=1288097196...
After I add getchar(); on those lines,
The first time still print out twice= =
But the second time is OK...
No...
The program prints the factors of the number twice...
I just want it to print once..
There are still some problems...
how can I let circled area in the photos disappeared??
http://i1128.photobucket.com/albums/m497/fail50/resass.jpg?t=1288082779
And here is my code :
#include...
I want to ask that how can I bring the result of a function to another??
for example, after rounding off a number how can this number enter to another function which can be factorized.
Also, what...
this is my assignment. it is not allowed me to use the build-in function
#include <stdio.h>
#include<math.h>
int to_round(float num_unround);
int is_factor(int x);
main()
{
char choose;
float num_unround;
printf("***** Student Name : Kan Ka Him *****\n");...
Can anyone can help me??
What should I type if I want to call the function 'to_round' and 'is_factor' between
scanf("%f", &num_unround);and
printf ("Would you like to enter the number again? (y/n)");
and also print...
and I also want to ask...
how can I call the function??
thx
I want write a program that convert the decimal
number to the nearest integer. Round up if the decimal place(s) is greater than or equal to 0.5.
Otherwise, round down the number.
After converting...