<?php

namespace Test\Room;

use Game\Logic\RoomCustomize\RoomInfoLogic;
use Game\Logic\RoomCustomize\RoomLogic;
use Game\Logic\Pvp\PvpLogic;
use Test\TestBase;

class TestRoom extends TestBase
{
    use RoomLogic;
    use RoomInfoLogic;
    use PvpLogic;


    public function getPlayerId(): int
    {
        // lmf1
//        return 288663224628518513;
        // lmf2
        return 288686670857922921;
    }

    public function startTest()
    {

        // 房间测试用例
//        $this->fastJoinRoom(1);
//        $this->updateRoomMap(100006, 2);
//        $this->updateRoomMode(100005, 3);
//        $this->updateRoomState(100009, 1);
//        $this->updateRoomName(100007, 'lfx');
//        $this->updatePlayerCar(100001, 1003, 2017880756635213097);
//        $this->updatePlayerState(100007, 2);
//        $this->joinRoomByRoomID(100001);
//        $this->removePlayerByRoomID(100007, 288425485281071871);
//        $this->exitRoom(100001);
//        $this->removePlayerByRoomID(100001, 288400660370172300);


        // 自定义房间测试用例
//        $this->createRoom(1,9, '测试房间删除2', "6666");
        // 删除所有玩家
//        $this->RemoveRoomAllPlayer(1042);
        // 同步房间失效时间
//        $this->changeRoomExpireTime(1002, 2000);
//        $this->joinRoomByRoomID(1048, "6666");

        // 角色 是否观战
        // 以观战模式加入房间
//        $this->joinWatchByRoomID(1050, "6666");


//        $this->updateRoomName(1000, '5231');
//        $this->updateRoomState(1000, 2);
//        $this->updateRoomMode(1000, 8);
//        $this->updateRoomMap(1000, 2);
//        $this->exitRoom(1000);

        // 设置ai补位
//        $this->updateRoomAI(1000, false);
        // 设置密码
//        $this->updateRoomPwd(1000, '12332');
        // 房主踢出玩家
//        $this->removePlayerByRoomID(1000, 288739739470379478);
        // 玩家修改车 准备状态
//        $this->updatePlayerCar(1000, 1004, 2018038038359966884);
//        $this->updatePlayerState(1000, 3);

        // 玩家修改位置
//        $this->updatePlayerTeam(1001, 12);
        // 密码是否可见
//        $this->updateRoomIsShowPwd(1004, true);



        // 获取自定义房间列表
//        $this->getCustomizeList(1);

        // 收藏保存地图
//        $this->saveMapID(6, 2);


    }
}

