Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing the Stopwatch #15

Merged
merged 17 commits into from
Mar 13, 2024
Merged

Commits on Mar 9, 2024

  1. Implemented core-logic of Stopwatch and using it in project:

    1) Added dependencies of kotlinx:
    1.1) -datetime (to get time)
    1.2) -coroutines-core (to count time with coroutines)
    
    2) Implemented core logic of Stopwatch (wanted to make it like module - but make it later, because not so easy, for me, to adopt Stopwatch in project)
    
    3) Using Stopwatch in project (now only start, when user pop first tile, and stop (reload) when user clicks `RestartButton`). To use Stopwatch in project:
    3.1) include StopwatchViewModel in GameComponent
    3.2) using collectAsState on the Flow of current tick of Stopwatch
    
    Current bugs:
    4) Stopwatch not stops even if user goes to GameStatus
    4.1) WIN
    4.2) FAILED
    b0r1ngx committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    2fd0132 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    49c1f99 View commit details
    Browse the repository at this point in the history
  3. not use wildcard imports

    b0r1ngx committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    08fbe7d View commit details
    Browse the repository at this point in the history
  4. 1) Improved contentDescriptions of Counter's (not tested)

    2) added description to TODO
    b0r1ngx committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    fcc1514 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8504825 View commit details
    Browse the repository at this point in the history
  6. using coroutineContext.isActive instead of NonCancellable.isActive - …

    …for prevent failing build
    b0r1ngx committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    a1861eb View commit details
    Browse the repository at this point in the history
  7. 1) Re-implement logic of stopwatch (timer)

    2) Now the version is crashed with error: [MVIKotlin]: Main thread id is undefined, main thread assert is disabled
                                              Exception in thread "main" java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
    b0r1ngx committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    5426f02 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ac84e84 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bb4c4b6 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2024

  1. fixes given from code review

    b0r1ngx committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    e1956da View commit details
    Browse the repository at this point in the history
  2. 1) Stopwatch is working - tested in game (Plans: write tests!)

    *more fixes given from code review
    b0r1ngx committed Mar 10, 2024
    Configuration menu
    Copy the full SHA
    03d48f1 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. Configuration menu
    Copy the full SHA
    e6dea88 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2024

  1. 1) Changes given from code review

    2) Wrote first test for stopwatch
    b0r1ngx committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    b07d65e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    65ac75f View commit details
    Browse the repository at this point in the history
  3. 1) Implemented some tests with project creator help

    2) Deprecate using stopwatch in strings
    b0r1ngx committed Mar 12, 2024
    Configuration menu
    Copy the full SHA
    890b144 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. 1) Changes given from code review

    2) shift timer to different values
    b0r1ngx committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    5fe3607 View commit details
    Browse the repository at this point in the history
  2. status win -> win

    b0r1ngx committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    8bb072d View commit details
    Browse the repository at this point in the history