Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why isn't Move.NullMove a constant #467

Open
deadpdf opened this issue Sep 1, 2023 · 1 comment
Open

why isn't Move.NullMove a constant #467

deadpdf opened this issue Sep 1, 2023 · 1 comment

Comments

@deadpdf
Copy link

deadpdf commented Sep 1, 2023

public string GetBestMove(Board board, int depth = 3, Move prvmove = Move.NullMove)
I want the previous move made for each depth , but its giving the following error
Default parameter value for prvmove must be a compile time constant?

@ryanheath
Copy link

You could try pass default instead
public string GetBestMove(Board board, int depth = 3, Move prvmove = default)
if you are lucky default could translate into the same state as Move.NullMove (it is not strictly the same!)

If that doesn't work, then save yourself the headache, remove the default value and pass Move.NullMove where appropiate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants