package com.example.gameofmoon

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.gameofmoon.ui.theme.GameofMoonTheme
import com.example.gameofmoon.presentation.ui.screens.TimeCageGameScreen

/**
 * 主活动
 * 月球游戏的入口点
 */
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()
        setContent {
            GameofMoonTheme {
                Surface(
                    modifier = Modifier.fillMaxSize()
                ) {
                    TimeCageGameScreen()
                }
            }
        }
    }
}

@Preview(showBackground = true)
@Composable
fun TimeCageGameScreenPreview() {
    GameofMoonTheme {
        Surface(
            modifier = Modifier.fillMaxSize()
        ) {
            TimeCageGameScreen()
        }
    }
}