Skip to content

JPLynch35/battleshift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleshift

Summary


This project is a back end API for the game Battleship. A version of this API was already created as a player vs computer game, our aim was to create a player vs player version.

In order to play, both users must register by visiting the home page and clicking on the link in the verification email. All game requests to the api will require the user's api key in the headers under X-API_Key: your-api-key

Production Site (Back End API)


https://battleshift19.herokuapp.com/

EndPoints


Create a Game

Player 1 creates a game by sending over their API key and Player 2's email address. Both players should already exist in the system.
POST /api/v1/games

Place a Ship

Place a ship on the requesting player's board. Player is determined by the API key sent. Should only allow players who are part of this game.
POST /api/v1/games/:game_id/ships

Fire a Shot


Send a target coordinate to fire upon the opponents board. Sender is determined by the API key that is sent over. Should only allow players who are part of this game. Should not allow a user to fire when it is not their turn.
POST /api/v1/games/:game_id/shots

Collaborators


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 90.8%
  • HTML 7.3%
  • JavaScript 1.2%
  • CSS 0.7%