lordmauve / lordmauve/pgzero

Expose Clock instance directly in order to get the current game time

Open
#357 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
611
Forks
211
PR merge metrics
No merged PRs in 30d

Description

`Clock.t` stores the elapsed time of the clock.

Due to the way we expose the clock in builtins, `clock` is a module. We could convert it to a `Clock` instance, in which case `clock.t` would be a way of accessing the time.

(We should explain in documentation that `t` is the commonly used mathematical variable for time, hence the short name.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Clock implementation and the builtins code that currently exposes clock as a module. Check how Clock.t stores elapsed time and how builtins are tested, then make the exposure provide direct access to the Clock instance and document why t is used for time.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
game-dev
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.