asrayousuf / ScrabbleWordRecommender

0 stars 0 forks source link

WorkFlow Issue #25

Open theCuriosityEnthusiast opened 9 years ago

theCuriosityEnthusiast commented 9 years ago

I cannot understand the workflow at all. Explain in simple terms what the algorithm is. And what is the role of each team in terms of Implementation.

aravindsrivats commented 9 years ago

The structure for the dictionary is: Map < String, String > Key is the sorted word Value is "score anagram1 anagram2 . ."

Team 1 will be creating method to find possible words based on input rack and blank spaces if any.

Team 2 will write functions like hasBlankSpace, countBlankSpace, getInputRackWithoutBlankSpace, calculateScoreWithBlankTiles which will be called from the main of Team 1.

Team 3 will write functions that will take the constraints and returns an input rack based on the constraint. You will have function that will check if the result of that input rack matches the constraint and return only the list of the words that have along with the score.

aravindsrivats commented 9 years ago

All calls happen from Team 1 main(). All other functions must take an input and return a value/list/boolean

ekanshmittal commented 9 years ago

Currently team 3, we have created a function public List applyConstraint(String constraintPattern, String tiles); which takes constraint pattern and tiles and returns all possible words. it internally calls team 1 method to get all possible words if there is no blank tiles else it calls team 2 method to get all possible words with blank tiles

What changes are to made ?

aravindsrivats commented 9 years ago

No. Your functions cant call other classes. Your functions should return the final input rack to the main which will generate the result and call your checkConstraint (or some name) function which will return the list of possible strings.

shrvenkataraman commented 9 years ago

Go through our code and explain what you said above clearly. We can't understand what you are saying, it's too abstract.

shrvenkataraman commented 9 years ago

Basically, you will be passing a list of words with their scores to us - we will check constraint and return the list of words that match the constraint from the list that you provided.

aravindsrivats commented 9 years ago

I dont know why you are using rackWithoutBlanks as a state if its not initialised to the string we are passing. You wouldn't need that in the first place.

aravindsrivats commented 9 years ago

Your function looks how I explained it. You just have to do the scoring mechanism now.

ekanshmittal commented 9 years ago

according to our earlier discussions, you said you will pass list of words and their scores and we will just pattern match and return the list of words that match it. so we are not scoring anywhere

ekanshmittal commented 9 years ago

and also it was stated that if the tiles have blanks we call team 2 method else team 1 method. that is why we are using the rackwithspaces state

ekanshmittal commented 9 years ago

please clarify as to what is excepted and what all functions we should be calling in your classes for that functionality

aravindsrivats commented 9 years ago

You should call the functions only in the Team 2 classes. Team 1 main will call your functions like generateInputRackWithConstraints will add the constraint character to the input rack and give. Team 1 main will call your function getWordsByConstraintMatch by passing the possible words which will return the possible words that match regex.