### [L-1] Function `EggHuntGame::getTimeRemaining` shows the time remaining higher than 0 in case the owner decides to end the game
**Description:** If the Owner of the contrct decides to call `EggHuntGame::endGame` the startTime and endTime are not updated making the `EggHuntGame::getTimeRemaining` return a value greater than 0 giving the player wrong information.
**Impact:** Player who calls the function sees the time is not over even if the game is ended by the owner
**Proof of Concept:**
1. Owner of the game ends the session
2. Player calls `EggHuntGame::getTimeRemaining` to see if he has time left to search for the NFT
3. Player gets back startTime - endTime which is greater than 0 even though the game ended
**Recommended Mitigation:** Set startTime equal to endTime in the `EggHuntGame::endGame`
```diff
function endGame() external onlyOwner {
require(gameActive, "Game not active");
gameActive = false;
+ startTime = block.timestamp;
+ endTime = block.timestamp;
emit GameEnded(block.timestamp);
}
```