question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IsDraw() is never returning true when a position is a draw

See original GitHub issue

`public Move Think(Board board, Timer timer) { isWhite = board.IsWhiteToMove; Tuple<Move, float> BestMove = MiniMax(board, 4, -100000, 100000, true); Console.WriteLine(“ChosenMove: " + BestMove); Console.WriteLine(”-=-=-=-=-=-=-=-=-=-=-"); board.MakeMove(BestMove.Item1); if (board.IsDraw()) { System.Threading.Thread.Sleep(1000000); }

    return BestMove.Item1;
}`

this never sleeps when a drawing position occurs. i cannot get IsDraw() to return true.

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SebLaguecommented, Jul 30, 2023

This should be fixed in the latest version, sorry about that!

0reactions
loki12241224commented, Jul 31, 2023

The newest update to the file seems to have fixed the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I determine a winner in my Tic Tac Toe program
You have already the loop to play, so, in each iteration, in the same way you check if the game isDraw() , check...
Read more >
tic tac toe/nought and crosses exercise
HI chaps I am trying to build a simple tic tac toe application. 1) what type should the array have?
Read more >
Tic-tac-toe - Java Game Programming Case Study
Compute and return the * new game state (PLAYING, DRAW, CROSS_WON, NOUGHT_WON) ... validInput); // repeat until input is valid } /** The...
Read more >
Simple Tic-Tac-Toe JavaScript game for beginners
This one just returns the value in case there is a draw, meaning that neither of the players has won. There is also...
Read more >
Chess.js
isGameOver(). Returns true if the game has ended via checkmate, stalemate, draw, threefold repetition, or insufficient material. Otherwise, returns false.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found