This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:fall2024:projects:dsr0 [2024/09/26 01:48] – [powers of two base math] gsalce | notes:fall2024:projects:dsr0 [2024/09/26 16:08] (current) – [checking time] jmerri10 | ||
---|---|---|---|
Line 9: | Line 9: | ||
The goal of the conversions game mode should be for the player to be prompted with a number in one base, and be instructed to find the answer in another base (also prompted). | The goal of the conversions game mode should be for the player to be prompted with a number in one base, and be instructed to find the answer in another base (also prompted). | ||
+ | |||
+ | Can use shuf -i alongside an array to randomly generate a base | ||
=====checking time===== | =====checking time===== | ||
By using " | By using " | ||
+ | |||
+ | date +%r will give you the time in this format: HH:MM:SS AM/PM | ||
+ | |||
+ | date +%s will give you the time in seconds since the Unix epoch. If you want to use date +%s to get the current minutes, you can divide the output of date +%s by 60; if you want to use date +%s to get the current seconds, you can use the modulus operation (%60). | ||
+ | |||
=====state file: keeping score across sessions===== | =====state file: keeping score across sessions===== | ||