"""Tests for the hand_tracking.game module."""

import pytest
import sys
import os

# Add src to path for imports
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', 'src'))


class TestHandTrackingGame:
    """Test suite for HandTrackingGame class."""

    def test_class_exists(self):
        """Test that HandTrackingGame class exists."""
        from hand_tracking.game import HandTrackingGame
        assert HandTrackingGame is not None

    def test_gesture_directions_defined(self):
        """Test that gesture to direction mapping is defined."""
        from hand_tracking.game import HandTrackingGame
        assert hasattr(HandTrackingGame, 'GESTURE_DIRECTIONS')
        gestures = HandTrackingGame.GESTURE_DIRECTIONS
        assert 'up' in gestures
        assert 'down' in gestures
        assert 'left' in gestures
        assert 'right' in gestures

    def test_gesture_directions_values(self):
        """Test that gesture directions map to correct offsets."""
        from hand_tracking.game import HandTrackingGame
        gestures = HandTrackingGame.GESTURE_DIRECTIONS
        assert gestures['up'] == (0, -1)
        assert gestures['down'] == (0, 1)
        assert gestures['left'] == (-1, 0)
        assert gestures['right'] == (1, 0)


class TestGameFunctions:
    """Test suite for game module functions."""

    def test_main_exists(self):
        """Test that main function exists."""
        from hand_tracking.game import main
        assert callable(main)
