Skip to content

Feature/53/add clock#59

Open
Lucas-2306 wants to merge 5 commits intodevelopfrom
feature/53/add-clock
Open

Feature/53/add clock#59
Lucas-2306 wants to merge 5 commits intodevelopfrom
feature/53/add-clock

Conversation

@Lucas-2306
Copy link
Contributor

@Lucas-2306 Lucas-2306 commented Oct 16, 2023

Fixes #53

Feature: Added a timer (clock) that keeps track of the duration of the curren run.

Datetime imported

Added variables:

  • TIMER_COLOR: stores the color of the timer shown in the screen
  • time_start: stores the time at the beginning of each run
  • time_delta: store the time span from the start of the run until the present moment
  • time_render: stores the timer to be shown on the screen

When the "if not self.alive event" of the object "snake" returns "true", the value of the "time_start" is updated.

@Lucas-2306 Lucas-2306 linked an issue Oct 16, 2023 that may be closed by this pull request
@Lucas-2306 Lucas-2306 self-assigned this Oct 16, 2023
@monacofj monacofj changed the base branch from main to develop October 17, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a clock to keep track of time alive

3 participants