asrayousuf / ScrabbleWordRecommender

0 stars 0 forks source link

Scoring for blank tiles #12

Closed aravindsrivats closed 9 years ago

aravindsrivats commented 9 years ago

How is the scoring going to be handled for blank tiles?

theCuriosityEnthusiast commented 9 years ago

We plan to use a HashMap internally still figuring it out.

aravindsrivats commented 9 years ago

Has anyone changed the naming of Word class? I'm assigning it to Aravind AR @aravindram94 Change the Word Class's variables to word and score.

harr93 commented 9 years ago

We were thinking of using our original method to handle blanks.

  1. You will give us the rack with blanks.
  2. We will fill the words.
  3. For each filled word(rack) we will call the generate words function, from Team 1's class which will return a Map of sorted rack as key and list of anagrams as value.
  4. We will then calculate score as : score of key - score of non character in input and put it in a Map with key being score and value being the anagrams.
  5. We will return the top n of the sorted Map to the caller.
harr93 commented 9 years ago

The function in Team 1's class should not care about number of spaces. Given a key the function should get possible words.

aravindsrivats commented 9 years ago

Yes. If there are blank spaces only, it'll count and match them.

harr93 commented 9 years ago

That would lead to us iterating over most or all of the sorted keys. This way we would give you the sorted filled rack and your function can lookup the possible words and return them in a Map.

aravindsrivats commented 9 years ago

You would not have to use the keys at all. All you have to do is, subtract the score of the characters in the result that our module returns which are not in the input strings.

harr93 commented 9 years ago

I have a question: You pass me the string with the blanks. I calculate the number of blanks in the string. Now, do I call your generate word function with the the rack without blanks as key and number of blanks as value?

harr93 commented 9 years ago

Or do I return the number of blanks to you?

asrayousuf commented 9 years ago

You dont pass on no. of blanks to us

harr93 commented 9 years ago

Closing this issue as the function is completed as decided upon.