help me write please
I need to hand over the work in 2 days, and I work every day.
The task itself:
tic tac toe
Console output graphically (CLI).
The cells are numbered.
Moving between cells is carried out by arrows.
When you press Enter, the player's symbol is installed in the selected cell.
There should be a check for an attempt to install a character in an occupied cell - display the appropriate message.
implement 3 levels of difficulty:
1. The computer goes to any unoccupied cell
2. The computer walks with the expectation of winning. Those. finds a winning combination in which two cells are filled with its symbols and puts the third symbol in an empty cell. If there is no opportunity to win - point 1.
3. The computer tries to win, as in point 2. but if there is no possibility of winning, it tries to spoil the user's move - ie. finds a combination with two user symbols and puts its symbol in an empty cell. If this is not possible, point 1.
Check for a winning / treacherous move and check for a win through an array of winning combinations.
Thank you all in advance, I'll say right away that I'm not going to the coder, this is the last job
I'll say right away that I'm not going to the coder, this is the last job
You should consider moving this to jobs section if you want someone to write code for you. Why are you taking a programming class if you don't want to program? You're digging yourself into a hole.
Otherwise, if you actually are trying to learn something, you need to give it an attempt first yourself.
If you have no idea where to start, review your class notes or look at a tutorial. http://www.cplusplus.com/doc/tutorial/
You don't have the time, so you want US to write the code for you. For free.
M'ok, here's some code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <cctype>
#include <limits>
int main()
{
std::cout << "Do you want someone to do all the work for you? ";
char answer{};
std::cin >> answer;
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
if (std::toupper(answer) == 'Y' ) { std::cout << "Post it in the Jobs section.\n"; }
}