Function backend::create_player

source ·
pub(crate) async fn create_player(name: Path<String>) -> impl Responder
Expand description

Creates a new player with the provided username. The new player will have the following defaults: Health = 3, X and Y positions = Center of HTML5 canvas.

How to use

The request structure is the following: http://ip_address/join/<USERNAME>

  • is the username of the player you wish to create