composer install fvfvfvfv/codyfight-php
Before being able to interact with the Codyfight API, you need to generate a CKey
$codyfight = new \Fvfvfvfv\CodyfightClient\Codyfight($cKey);$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
$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