So there are 12 sticks. The last stick (left most one) is the special stick. If you can take that stick, then you win. But in order to take that stick, you and the computer must take turns starting from the right end and taking either 1, 2, or 3 sticks at a time.
For example, you can take 2 sticks, while the computer takes 1. And whoever ends up taking the last stick wins the game.
I've watched a video on this stuff I forgot how it works but it is imposible (unless there are an odd amount of sticks or you go second)
Ye ik some not for profit organizations use a slightly different version of this gamer as a fundraiser (you pay to play) and unless you know the trick (game is unwinable if you go first and there is an even #). You will always lose and people will do it again and again to try to win. @DynamicSquid
Btw: for portability, don't use
L"\e[H\e[2J", that's the shortest ANSI sequence for clearing the terminal.