Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A PHP Client for interacting with the Codyfight API


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

About

A PHP client for Codyfight

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages