<?php

namespace Test\Task;

use Game\Constant\ConstTemplate\TemplateTask;
use Game\Constant\GameConstantDefine;
use Game\Data\TaskData;
use Game\Logic\Task\TaskLogic;
use Test\TestBase;

class TestMainTask extends TestBase
{
    use TaskLogic;

    public function getPlayerId(): int
    {
        return 2222;
    }

    public function startTest()
    {
        $taskList = $this->getMainTask();
        var_dump($taskList);
        /**
         * @var TaskData $taskData
         */
        $taskData = $taskList[0][0];
        $taskData = $this->searchTask($taskData->taskId);
        var_dump($taskData);

        //触发任务
        $this->triggerEvent(2,
                            array(
                                GameConstantDefine::EVENT_KEY_NUM => 10,
                                GameConstantDefine::EVENT_KEY_CAR_ID => 1003
                            )
        );

        //提交任务
        $this->submitTask($taskData);

    }
}
