score_calculator.py (prev. word_to_score.py)
Opened this issue · 5 comments
The char_dict
should be made global so it is accessible to all the functions.
Function: base_score
---> renamed from point_conversion
Purpose: Calculates base score of a given word
Acceptance Criteria:
- Returns base score of the word.
Function: multiplier_score
Purpose: Calculates score of a given word including any letter/word tiles multipliers passed
Acceptance Criteria:
- Returns total score of the word
- Must account for any multiplier tiles.
I see that the char_dict
has an item as '*': 0
.
I don't think *
should be an acceptable user input and I believe this was patched in Phase 1. So before I remove this, just wanted to check with the group if there is a Scrabble rule I'm missing or if I can remove this in the code I'm building?
EDIT: I see the *
has a reference in valid_word_check.py
, however, my understanding is that the function replaces it with a suitable letter from the list so it wouldn't be scored anyway. I'm new to this stuff so I may be completely off on this so please bear with me.
Thanks!
Sure! Scrabble has a 'blank' tile that can represent any letter but contributes zero points to the score. On a previous issue we discussed how best to represent blank tiles and decided on allowing the user to enter * in place of a blank.
Ah that makes sense! I was under the impression the letter chosen in place of the blank tile would also carry the score with it. Thanks for clearing that up!
Raised a pull request to the phase-2-dev branch from my fork. Thanks for looking into it!
First pull request so I hope the pull process was right. If not, do let me know what needs to be changed.
EDIT: GitHub is not letting me move this issue to In Progress
in the Projects tab. Could be a permissions challenge.
Thanks & Regards,
Nakul K D
Looks good Nakul!