mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
mechanic: port game logic
This commit is contained in:
+6
-2
@@ -6,8 +6,12 @@ def seed(source: T.Any) -> None:
|
||||
random.seed(source)
|
||||
|
||||
|
||||
def choice(source: T.Iterable[T.Any]) -> T.Any:
|
||||
return random.choice(source)
|
||||
def choice(source: T.Sequence[T.Any]) -> T.Any:
|
||||
return source[below(len(source))]
|
||||
|
||||
|
||||
def choice_low(source: T.Sequence[T.Any]) -> T.Any:
|
||||
return source[below_low(len(source))]
|
||||
|
||||
|
||||
def below(num: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user