-
Notifications
You must be signed in to change notification settings - Fork 0
Checkpoint2 #14
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
base: master
Are you sure you want to change the base?
Checkpoint2 #14
Conversation
daniefer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job overall, just needs some work
| Console.WriteLine("\nIf you want to move a checker one space diagonally forward, enter 'move'."); | ||
| Console.WriteLine("\nIf a jump is available for one of your checker, you must enter 'jump'."); | ||
|
|
||
| string choice = Console.ReadLine(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do I always have to move or jump, I cannot switch between the two during game play?
| Console.WriteLine("Enter checker Row to move:"); | ||
| int row = int.Parse(Console.ReadLine()); | ||
| Console.WriteLine("Enter checker Column:"); | ||
| int column = int.Parse(Console.ReadLine()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time you use just Parse and not TryParse a QA person cries 😭
You should be doing input validation (checking what the user typed in matches what is acceptable).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you graded the wrong thing, that was my mockup.
| { | ||
| public static void Main(string[] args) | ||
| { | ||
| new Game(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might look like clean code, but doing a bunch of work in a constructor is a bad idea. You should have a method called Play or something like that. This becomes a problem when someone (could be you or someone else or a framework) want to figure out how this class works and this constructor calls never returns. In the next class you will use an DI framework and if it runs into a class like this, your program will just hang and there is not an easy way to figure out what is happening.
No description provided.