SebLague / Chess-Challenge

Create your own tiny chess bot!
https://www.youtube.com/watch?v=Ne40a5LkK6A
MIT License
1.78k stars 1.07k forks source link

i just started out what is this error and how do i fix it terminal issue #462

Closed nathan09rules closed 10 months ago

nathan09rules commented 10 months ago

C:\Users\Documents\Chess-Challenge-main (1)\Chess-Challenge-main\Chess-Challenge\src\My Bot\MyBot.cs(5, 17): error CS0161: 'MyBot.Think(Board, Timer)': not all code paths return a value [C:\User\Documents\Chess-Challenge-main (1)\Chess-Challenge-main\Chess-Challenge\Chess-Challenge.csproj]

Edward-789 commented 10 months ago

It means that your Think function may not always return a move.

jongdetim commented 10 months ago

Google "not all code paths return a value c#"

nathan09rules commented 10 months ago

Thanks