#!/usr/bin/env python
# -*- coding: utf-8 -*-

import configparser

# 创建一个配置解析器对象
config = configparser.ConfigParser()

# 读取配置文件
config.read('constant.ini')


def func1():
    # 获取配置值
    EGO_PLAYER_ID = config.get('DEFAULT', 'EGO_PLAYER_ID')
    OBJ_PLAYER_ID = config.get('DEFAULT', 'OBJ_PLAYER_ID')

    # 打印配置值以验证它们是否正确读取
    print(f"EGO_PLAYER_ID: {EGO_PLAYER_ID}")
    print(f"OBJ_PLAYER_ID: {OBJ_PLAYER_ID}")


def func2():
    FIRST_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'FIRST_ORDER_LOSS')
    SECOND_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'SECOND_ORDER_LOSS')
    THIRD_ORDER_LOSS = config.get('SINGLE_CASE_EVAL', 'THIRD_ORDER_LOSS')

    print(f"FIRST_ORDER_LOSS: {FIRST_ORDER_LOSS}")
    print(f"SECOND_ORDER_LOSS: {SECOND_ORDER_LOSS}")
    print(f"THIRD_ORDER_LOSS: {THIRD_ORDER_LOSS}")


def main():
    func1()
    func2()


main()
