My initial source code to the Tic Tac Toe project, this will be changing as I still need to add the prompt to ask the user to play again at the time of this writing, https://github.com/navarrorc/csharp-workbook/blob/master/02Week/TicTacToe.cs
Great video on Multidimensional arrays
Roberto this is throwing me an error on line 70…
|Error|CS1061|‘Dictionary<int, Coordinate>’ does not contain a definition for ‘GetValueOrDefault’ and no extension method ‘GetValueOrDefault’ accepting a first argument of type ‘Dictionary<int, Coordinate>’ could be found (are you missing a using directive or an assembly reference?)|TicTacToe|C:\Users\JULIE\Desktop\WORKBOOK\csharp-workbook\02Week\TicTacToe.cs|70|Active|
Did you get this figured out last night?
Replace line #70 with the following:
Coordinate coor; slot.TryGetValue(input, out coor);
This is one of the cases where it works on my computer and not on yours, but there is always a way to find an alternative route. Thanks for asking for assistance, let me know if this works.
I updated my code to reflect this change, it will work across Windows Classic Desktop applications and dotnet core application.
All the cool kids are now creating dotnet core applications, but there are minor differences that we have to deal with as developers.
Don’t forget that google is your friend, I was able to comfortably assume what caused the problem after googling a few sites that discussed a similar issue.
@kevincolten I’m using lucidchart.com, the free account limits you to 3 diagrams. I have a paid account myself and I’ve told students just to export to pdf after they are done and delete it so it frees up a slot.
Thanks so much Roberto… do Macs read code in VS different than PC? If that is the case it is good to know!! I will continue working on this and other projects over the weekend. Thanks and see you Tues.
@julieadams-831I don’t understand your question, but I can say that in order to code in C# on a mac you would need to install Visual Studio for Mac, you can read more about it at https://www.visualstudio.com/vs/visual-studio-mac/
There are other ways but I believe Microsoft would recommend Visual Studio for Mac over any other approach to beginner coders. Amanda in class is using Visual Studio for Mac, I’m sure she can give you a tour of this IDE (Integrated Development Environment).