Skip to content

Conversation

@d3marco
Copy link
Owner

@d3marco d3marco commented Oct 11, 2018

No description provided.

// using System.Collections.Generic;
// using System.Linq;
using System.Text;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing the tests.

sentence = Console.ReadLine();

foreach (string text in sentence.Split())
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are only handling the case when the vowel is in the first or second position.


public static string CompareHands(string hand1, string hand2)
{
// Your code here
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a different way to check for a tie?

public static string CompareHands(string hand1, string hand2)
{
// Your code here
if (hand1 == "rock" && hand2 == "rock")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method directly prints out to the console, I would like for this method to not do any user interaction, but return the appropriate value/result. And the calling method (Main in your case) handle the user interaction.


return hand1 + ' ' + hand2;
}
// public static bool test()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the tests defined, but the way you implemented CompareHands, these tests would not work.

public static void Main()
{
Console.WriteLine("Enter hand 1:");
string hand1 = Console.ReadLine().ToLower();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont see the try/catch block anywhere.

@d3marco
Copy link
Owner Author

d3marco commented Nov 11, 2018 via email

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

Successfully merging this pull request may close these issues.

3 participants