diff --git a/.gitignore b/.gitignore index d2115efc..f23bcbe8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ *.class */.vs *.suo +.vscode/ bin/ obj/ diff --git a/89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs b/89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs index 58f7d36f..d4955a40 100644 --- a/89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs +++ b/89_Tic-Tac-Toe/csharp/tictactoe1/Program.cs @@ -33,13 +33,15 @@ while(true) { d = move(c + 3); computerMoves(d); s = readYourMove(); - if (s != move(d + 4)) { + if (s == move(d + 4)) { + e = move(d + 6); + computerMoves(e); + Console.WriteLine("THE GAME IS A DRAW."); + } else { e = move(d + 4); computerMoves(e); + Console.WriteLine("AND WINS ********"); } - e = move(d + 6); - computerMoves(e); - Console.WriteLine("THE GAME IS A DRAW."); } else { d = move(c + 7); computerMoves(d);