mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
Bug fix of C# logic and ignore .vscode/ folder
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
|||||||
*.class
|
*.class
|
||||||
*/.vs
|
*/.vs
|
||||||
*.suo
|
*.suo
|
||||||
|
.vscode/
|
||||||
|
|
||||||
bin/
|
bin/
|
||||||
obj/
|
obj/
|
||||||
|
|||||||
@@ -33,13 +33,15 @@ while(true) {
|
|||||||
d = move(c + 3);
|
d = move(c + 3);
|
||||||
computerMoves(d);
|
computerMoves(d);
|
||||||
s = readYourMove();
|
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);
|
e = move(d + 4);
|
||||||
computerMoves(e);
|
computerMoves(e);
|
||||||
|
Console.WriteLine("AND WINS ********");
|
||||||
}
|
}
|
||||||
e = move(d + 6);
|
|
||||||
computerMoves(e);
|
|
||||||
Console.WriteLine("THE GAME IS A DRAW.");
|
|
||||||
} else {
|
} else {
|
||||||
d = move(c + 7);
|
d = move(c + 7);
|
||||||
computerMoves(d);
|
computerMoves(d);
|
||||||
|
|||||||
Reference in New Issue
Block a user