Skip to content

Commit

Permalink
s/to_rounds/get_rounds/
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Good authored and BethanyG committed May 12, 2021
1 parent 3cd390f commit c4f188f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/card-games/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Elyse is really looking forward to playing some poker (and other card games) dur

Elyse is especially fond of poker, and wants to track how many rounds she plays - and _which rounds_ those are. Every round has its own number, and every table shows the round number currently being played. Elyse chooses a table and sits down to play her first round. She plans on playing three rounds.

Implement a function `to_rounds` that takes the current round number and returns a single list with that round and the _next two_ that are coming up:
Implement a function `get_rounds` that takes the current round number and returns a single list with that round and the _next two_ that are coming up:

```python
>>> to_rounds(27)
>>> get_rounds(27)
[27, 28, 29]
```

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/card-games/.meta/exemplar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def to_rounds(number):
def get_rounds(number):
"""Return a list of rounds that includes `number` and the next two."""
return [number, number + 1, number + 2]

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/card-games/lists.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def to_rounds(number):
def get_rounds(number):
"""Return a list of rounds that includes `number` and the next two."""
pass

Expand Down
8 changes: 4 additions & 4 deletions exercises/concept/card-games/lists_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import random
from lists import (
to_rounds,
get_rounds,
concatenate_rounds,
list_contains_round,
card_average,
Expand All @@ -16,7 +16,7 @@ class TestToRounds(unittest.TestCase):
def test_instructions_example(self):
round_number = 27
want = [27, 28, 29]
got = to_rounds(round_number)
got = get_rounds(round_number)

self.assertEqual(
want,
Expand All @@ -27,7 +27,7 @@ def test_instructions_example(self):
def test_zero(self):
round_number = 0
want = [0, 1, 2]
got = to_rounds(round_number)
got = get_rounds(round_number)

self.assertEqual(
want,
Expand All @@ -38,7 +38,7 @@ def test_zero(self):
def test_random_int(self):
round_number = random.randint(0, 100)
want = [round_number + i for i in range(3)]
got = to_rounds(round_number)
got = get_rounds(round_number)

self.assertEqual(
want,
Expand Down

0 comments on commit c4f188f

Please sign in to comment.