Beruflich Dokumente
Kultur Dokumente
#include <iostream>
#include <string>
#include <Windows.h>
#define board std::cout << "
("<<a<<") |("<<b<<")| ("<<c<<")"<<std::endl;std
::cout << "
___|___|___ "<<std::endl;std::cout << "
("<<d<<") |("<<e<<"
)| ("<<f<<") "<<std::endl;std::cout << "
___|___|___ "<<std::endl;std::cout
<< "
("<<g<<") |("<<h<<")| ("<<i<<") "<<std::endl;
int main ()
{
int neuvo=1, gamenro=1,P1wins=0, P2wins=0;
char xo; // declaritions
std::string choice, player, Pelaaja1, Pelaaja2; // declaritions
SetConsoleTitle(TEXT("Tic-Tac-Toe")); // Naming Console title
std::cout << "Welcome to Tic-Tac-Toe game" << std::endl<< std::endl; //
Welcoming
std::cout << "Enter Player 1 name: ";
std::cin >> Pelaaja1;
std::cout << std::endl << "Enter Player 2 name: ";
std::cin >> Pelaaja2;
start: // defining start location (accessible with goto ; -function
char a=' ',b=' ',c=' ',d=' ',e=' ',f=' ',g=' ',h=' ',i=' ';
float turn=1;
std::cout
std::cout
std::cout
std::cout
std::cout
std::cout
<<
<<
<<
<<
<<
<<
"
"
"
"
"
"