fvfvfvfv/codyfight-php
Composer 安装命令:
composer require fvfvfvfv/codyfight-php
包简介
A PHP client for Codyfight
README 文档
README
Installation
composer install fvfvfvfv/codyfight-php
Usage
Before being able to interact with the Codyfight API, you need to generate a CKey
Creating a Codyfight instance
$codyfight = new \Fvfvfvfv\CodyfightClient\Codyfight($cKey);
Starting a game
$game = $codyfight->init(\Fvfvfvfv\CodyfightClient\Enums\GameMode::FRIENDLY, 'foo')
Every interaction with the Codyfight API returns a Game class instance
This instance contains all data returned from the API.
In the future this client will be extended to cast returned data into their relevant classes
Available methods
$codyfight->init(\Fvfvfvfv\CodyfightClient\Enums\GameMode::FRIENDLY, 'foo'); // Initializes a new game $codyfight->check(); // Returns a Game instance without performing any action $codyfight->cast($skillId, $x, $y); // Cast a skill onto the specified tile $dodyfight->move($x, $y); // Moves the player to the specified tile $codyFight->surrender(); // Surrenders the game
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-18