from .gamemanager import GameManager


def test_gameClock():
    mgr = GameManager()
    assert mgr.gameClock() == 0

    mgr.setGameClock(1)
    assert mgr.gameClock() == 1


def test_whiteScore():
    mgr = GameManager()
    assert mgr.whiteScore() == 0

    mgr.setWhiteScore(1)
    assert mgr.whiteScore() == 1


def test_blackScore():
    mgr = GameManager()
    assert mgr.blackScore() == 0

    mgr.setBlackScore(1)
    assert mgr.blackScore() == 1


def test_gameClockRunning():
    mgr = GameManager()
    assert mgr.gameClockRunning() is False

    mgr.setGameClockRunning(True)
    assert mgr.gameClockRunning() is True

    # Stop the clock before exiting
    mgr.setGameClockRunning(False)


def test_gameStateFirstHalf():
    mgr = GameManager()
    assert mgr.gameStateFirstHalf() is False

    mgr.setGameStateFirstHalf()
    assert mgr.gameStateFirstHalf() is True


def test_gameStateHalfTime():
    mgr = GameManager()
    assert mgr.gameStateHalfTime() is False

    mgr.setGameStateHalfTime()
    assert mgr.gameStateHalfTime() is True


def test_gameStateSecondHalf():
    mgr = GameManager()
    assert mgr.gameStateSecondHalf() is False

    mgr.setGameStateSecondHalf()
    assert mgr.gameStateSecondHalf() is True


def test_gameStateGameOver():
    mgr = GameManager()
    mgr.setGameStateSecondHalf()
    assert mgr.gameStateGameOver() is False

    mgr.setGameStateGameOver()
    assert mgr.gameStateGameOver() is True


def test_timeoutStateNone():
    mgr = GameManager()
    mgr.setTimeoutStateNone()
    assert mgr.timeoutStateNone() is True

    mgr.setTimeoutStateWhite()
    assert mgr.timeoutStateNone() is False


def test_timeoutStateRef():
    mgr = GameManager()
    mgr.setTimeoutStateRef()
    assert mgr.timeoutStateRef() is True

    mgr.setTimeoutStateNone()
    assert mgr.timeoutStateRef() is False


def test_timeoutStateWhite():
    mgr = GameManager()
    mgr.setTimeoutStateWhite()
    assert mgr.timeoutStateWhite() is True

    mgr.setTimeoutStateNone()
    assert mgr.timeoutStateWhite() is False


def test_timeoutStateBlack():
    mgr = GameManager()
    mgr.setTimeoutStateBlack()
    assert mgr.timeoutStateBlack() is True

    mgr.setTimeoutStateNone()
    assert mgr.timeoutStateBlack() is False

@@ -29,16 +29,41 @@
 eManager
+, GameState, TimeoutState
 %0A%0A%0Adef t
@@ -646,24 +646,101 @@
 () is True%0A%0A
+    mgr.setGameClockRunning(True)%0A    assert mgr.gameClockRunning() is True%0A%0A
     # Stop t
@@ -2340,20 +2340,510 @@
 ateBlack() is False%0A
+%0Adef test_tick():%0A    mgr = GameManager()%0A    mgr.tick()%0A    assert mgr._timer is None%0A%0A    mgr.setGameClockRunning(True)%0A    mgr.tick()%0A    assert mgr._timer is not None%0A%0A    mgr.setGameClockRunning(False)%0A%0Adef test_gameState():%0A    mgr = GameManager()%0A    mgr.setGameState(GameState.first_half)%0A    assert mgr.gameState() == GameState.first_half%0A%0Adef test_timeoutState():%0A    mgr = GameManager()%0A    mgr.setTimeoutState(TimeoutState.ref)%0A    assert mgr.timeoutState() == TimeoutState.ref%0A

Bring gamemanager test coverage back up to 100%