make random each day

This commit is contained in:
Klemek
2021-08-29 19:53:19 +02:00
parent c703494340
commit 125f1555b4
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ A better skin for Tetris!
* "Level" is battery level (0 - 100%) * "Level" is battery level (0 - 100%)
* "Lines" is current date (day + month) * "Lines" is current date (day + month)
* Digits patterns are not the same depending of the type (first digit of minutes, ...) * Digits patterns are not the same depending of the type (first digit of minutes, ...)
* Random piece is drawn on the bottom-right each minute * Random piece is drawn on the bottom-right each day (19 unique images)
![](./watchfaces/tetris-2.0/preview.png) ![](./watchfaces/tetris-2.0/preview.png)
-2
View File
@@ -78,8 +78,6 @@ double WatchyTetris::random()
uint32_t seed = currentTime.Year; uint32_t seed = currentTime.Year;
seed = seed * 12 + currentTime.Month; seed = seed * 12 + currentTime.Month;
seed = seed * 31 + currentTime.Day; seed = seed * 31 + currentTime.Day;
seed = seed * 24 + currentTime.Hour;
seed = seed * 60 + currentTime.Minute;
double v = pow(seed, 6.0 / 7.0); double v = pow(seed, 6.0 / 7.0);
v *= sin(v) + 1; v *= sin(v) + 1;