Skip to content

Commit 22bb10c

Browse files
authored
Merge pull request #24 from UBC-MDS/yhouyang02-patch-1
Rename score.py to get_score.py and update comments
2 parents c3c856e + 40a9472 commit 22bb10c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| Package | [![Latest PyPI Version](https://img.shields.io/pypi/v/wordguess.svg)](https://pypi.org/project/wordguess/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/wordguess.svg)](https://pypi.org/project/wordguess/) |
66
| Meta | [![Code of Conduct](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) |
77

8-
wordguess is a project that contains essential functions for a word-guessing game, inspired by Wordle.
8+
Wordguess is a project that contains essential functions for a word-guessing game, inspired by Wordle.
99

1010
## Summary
1111
The `wordguess` package is designed for developers to create guessing games. The package provides functionality for word validation, feedback generation, corpus management. It can compare user guesses to the target word and provide feedback on the accuracy of the guesses in terms of correct letters and their positions including numerical and human readable expressions. Additionally, features for scoring and hinting are included to enhance development of word guessing games. `wordguess` provides the back-end foundation needed to handle the underlying string comparisons and state tracking.
@@ -72,7 +72,7 @@ To use wordguess in your code:
7272
* **result** (*str*): A string of 0s, 1s, and 2s.
7373
* **Returns:** (*str*) A visual string of emojis (e.g., 🟩, 🟨, ⬛).
7474

75-
## Key Definitions
75+
## Key definitions
7676

7777
To ensure consistency for **users** (developers) and **players** (end-users), the following terminology is used throughout the package:
7878

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# score.py
2-
# author: Harry Yau
3-
# date 2026-01-09
1+
# get_score.py
2+
# Author: Harry Yau
3+
# Date: 2026-01-09
44

55
def get_score(result: list[str], penalty: bool = False, penalty_rate: float = 0.0) -> float:
66
"""
@@ -10,7 +10,7 @@ def get_score(result: list[str], penalty: bool = False, penalty_rate: float = 0.
1010
The calculation will be the highest score from the result list.
1111
each guess will contain characters '0', '1', and '2' representing different guess outcomes.
1212
13-
calculation will be sum of of the highest guess score diveded by the total score of the words.
13+
Calculation will be sum of of the highest guess score diveded by the total score of the words.
1414
for example, if the highest guess score is "12222"
1515
the returning score will be (1+2+2+2+2)/10 * 100 = 90.0
1616
@@ -50,4 +50,4 @@ def get_score(result: list[str], penalty: bool = False, penalty_rate: float = 0.
5050
90.0
5151
5252
"""
53-
...
53+
...

0 commit comments

Comments
 (0)