Skip to main content
POST
/
api
/
v1
/
cubic
/
attack
Attack
curl --request POST \
  --url http://50.187.81.221:4000/api/v1/cubic/attack \
  --header 'Content-Type: application/json' \
  --data '
{
  "gameID": "uniqueGame123",
  "direction": "CURRENT",
  "attackingShip": {
    "teamName": "RedTeam",
    "shipName": "RedDestroyer1"
  },
  "target": {
    "teamName": "BlueTeam",
    "shipName": "BlueScout1"
  }
}
'

Body

application/json

Details for a ship to perform an attack, including the game ID, the direction of attack, the attacking ship, and the target ship.

Data transfer object for a ship to perform an attack action against another ship.

gameID
string
required

The unique identifier of the game.

direction
enum<string>
required

The direction of the attack relative to the attacking ship. 'CURRENT' means attacking at the same vertex.

Available options:
CURRENT,
UP,
DOWN,
LEFT,
RIGHT,
FORWARD,
BACK
attackingShip
object
required

The ship initiating the attack.

target
object
required

The ship being targeted by the attack.

Response

201

Attack successfully executed.