Skip to content

Implement random.rockPaperScissors() #81

@Smoren

Description

@Smoren

Generate random rock-paper-scissors hands.
Return values: "rock", "paper", "scissors".

If optional param repetitions not given then iterate infinitely.

function *rockPaperScissors(repetitions?: number): Iterable<"rock" | "paper" | "scissors">

PHP implementation example

Needs to be implemented:

  • random.rockPaperScissors()
  • random.rockPaperScissorsAsync()
  • Stream.rockPaperScissors()
  • AsyncStream.rockPaperScissors()

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions