Skip to content

Commit 536bdf5

Browse files
committed
Del time
1 parent a81f546 commit 536bdf5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ void dead (){
255255
SHOW_CURSOR();
256256
etime = clock();
257257
// system ("clear");
258-
printf ("\033[31m Boom! You lose! Used %lf sec.\033[0m\n", double(etime-stime)/CLOCKS_PER_SEC * 1000);
258+
printf ("\033[31m Boom! You lose!\033[0m\n");
259259
freopen ("/tmp/tminesweeper-tmp", "w", stdout);
260-
printf ("User %s lose the game. Used %lf sec.\n", user.user, double(etime-stime)/CLOCKS_PER_SEC * 1000);
260+
printf ("User %s lose the game.\n", user.user);
261261
system ("echo $(cat /tmp/tminesweeper-tmp) >> $HOME/.local/share/tminesweeper/log");
262262
exit (0);
263263
}
@@ -478,6 +478,7 @@ int StartGame()
478478

479479
int main (int argc, char* argv[])
480480
{
481+
srand((int)time(NULL));
481482
if (argc > 1)
482483
{
483484
if (strcmp (argv[1], "init") == 0)

tminesweeper

88 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)