I just finished a tic-tac-toe game in ascii. I know it isnt very appealing or great but its my first real game i made my self. I hope that this will give you helpfull hints and stuff for your challanges!

NOTE: THIS IS SOME LONG CODE!(Or its longest i've ever written)

//BEGIN CODE!!!
//------------------------------------------------------
#include <iostream.h>
#include <string.h>
#include <conio.h>

//Globals
int player=1;
int winner=0;
int tie=0;

char board[3][3] = { // An Array to hold board data
{'1','2','3'},
{'4','5','6'},
{'7','8','9'}
};

// Functions
void draw_map(); // Draw map and take input
void clrscr(); // Clear the screen
void check_4_winner(); // Checks for a winner

// Loaly little main()!
int main()
{
draw_map();



return 0;
}

// Actully Functions now========================
// Draw Map--------------
void draw_map()
{
int choice;
int r,c;
clrscr();
winner=0;
while(!winner)// Loop 9 times(amount of spaces on board) or untill a winnner!
{

retry:
clrscr();

cout << " " << board[0][0] << " | " << board[0][1] << " | " << board[0][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[1][0] << " | " << board[1][1] << " | " << board[1][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[2][0] << " | " << board[2][1] << " | " << board[2][2] << endl;
cout << "\n";
cout << "Player "<<player<<": ";
cin >> choice;
if((board[0][0] != '1') && (board[0][1] != '2') && (board[0][2] != '3') &&
(board[1][0] != '4') && (board[1][1] != '5') && (board[1][2] != '6') &&
(board[2][0] != '7') && (board[2][1] != '8') && (board[2][2] != '9'))
{
goto tie;
}
switch(choice)
{
case 1:
if((board[0][0] == 'X') || (board[0][0] == 'O')){goto retry;}
board[0][0] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 2:
if((board[0][1] == 'X') || (board[0][1] == 'O')){goto retry;}
board[0][1] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 3:
if((board[0][2] == 'X') || (board[0][2] == 'O')){goto retry;}
board[0][2] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 4:
if((board[1][0] == 'X') || (board[1][0] == 'O')){goto retry;}
board[1][0] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 5:
if((board[1][1] == 'X') || (board[1][1] == 'O')){goto retry;}
board[1][1] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 6:
if((board[1][2] == 'X') || (board[1][2] == 'O')){goto retry;}
board[1][2] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 7:
if((board[2][0] == 'X') || (board[2][0] == 'O')){goto retry;}
board[2][0] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 8:
if((board[2][1] == 'X') || (board[2][1] == 'O')){goto retry;}
board[2][1] = (player==1) ? 'X':'O';
check_4_winner();
break;
case 9:
if((board[2][2] == 'X') || (board[2][2] == 'O')){goto retry;}
board[2][2] = (player==1) ? 'X':'O';
check_4_winner();
break;

default:
cout << "Not a valid selection!";
goto retry;
break;
}
player = (player%2) +1;
clrscr();
check_4_winner();

}

if(tie==1)
{
cout << " " << board[0][0] << " | " << board[0][1] << " | " << board[0][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[1][0] << " | " << board[1][1] << " | " << board[1][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[2][0] << " | " << board[2][1] << " | " << board[2][2] << endl;
cout << "\n";
cout << "A Tie!\n\n\n";
goto end;


}
if(player == 1)
{
cout << " " << board[0][0] << " | " << board[0][1] << " | " << board[0][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[1][0] << " | " << board[1][1] << " | " << board[1][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[2][0] << " | " << board[2][1] << " | " << board[2][2] << endl;
cout << "\n";
cout << "Player 2 Wins!!\n\n\n";
goto end;


}
if(player == 2)
{
cout << " " << board[0][0] << " | " << board[0][1] << " | " << board[0][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[1][0] << " | " << board[1][1] << " | " << board[1][2] << endl;
cout << "-----+-----+-----" << endl;
cout << " " << board[2][0] << " | " << board[2][1] << " | " << board[2][2] << endl;
cout << "\n";
cout << "Player 1 Wins!!\n\n\n";
goto end;


}
check_4_winner();
tie:;
cout << endl << "TIE GAME!"<<endl;

end:;
}


//Clear Screen -----------------------
void clrscr()
{
for(register i=0;i<=30;i++)
{
cout << endl;
}
}

//Check for a winner ---------------------------
void check_4_winner()
{
clrscr();
if((board[0][0]==board[1][1] && board[0][0]==board[2][2]) ||
(board[0][2]==board[1][1] && board[0][2]==board[2][0]))
{
winner=1;
}
else
{
for(int i=0; i <=2;i++)
{
if((board[i][0] == board[i][1] &&
board[i][0] == board[i][2]) ||
(board[0][i] == board[1][i] &&
board[0][i] == board[2][i]))
winner = 1;
}


}

}
// END CODE!!
//---------------------------------------

well i know its rarely commented but it shoudnt be to hard to figure the logic.
But feel free to post as many questions as you like! I'll try my best to help anyone that might need it!

My next step is to input a computer difficulty!!
and work out the bug(s)

-------------------------------
BUGS
-------------------------------
1.) We'll the only one that really counts is when you get a tie, you have to type one more number befor it recognizes it. It's not to big but it is bothersom and i have yet to fix it!

------------------------------
GENERAL INFO.
------------------------------
This was Programmend by me of course, and i used
Visual C++ 6.0
I don't know if that helps some but it might.

--
ok i think thats about it! All the advanced programmers didn't need it i aimd at newbies like my self. Eventully i want...

AI
Actully Graphics(IE: mode 13h and lines)
No Bugs
And mouse support

--
We'll i can get all those eventully except mode 13h and real graphics caue i cant use mem.h since i dont have it. So untill i find a way around it or a tutorial to teach me how to gointo 13h without it you'll be stuck with this