C# Class BattleShip.Web.Controllers.GameController

Inheritance: Controller
Show file Open project: pebblecode/HackShips

Public Methods

Method Description
Create ( string name, string myemail, string opponentemail ) : System.Web.Mvc.JsonResult
GetTargetZone ( ) : System.Web.Mvc.JsonResult
Index ( ) : System.Web.Mvc.ActionResult
IsItMyTurn ( ) : System.Web.Mvc.JsonResult
JoinGame ( string gameId, string email ) : System.Web.Mvc.ActionResult
NewGame ( ) : System.Web.Mvc.ActionResult

Private Methods

Method Description
ConvertGeoDistanceToMeters ( GeoCoordinate center, double geodistance ) : double
GetRandomCenter ( ) : GeoCoordinate
SendEmail ( string gameId, string email ) : void
Shoot ( double latitude, double longitude ) : System.Web.Mvc.JsonResult

Method Details

Create() public method

public Create ( string name, string myemail, string opponentemail ) : System.Web.Mvc.JsonResult
name string
myemail string
opponentemail string
return System.Web.Mvc.JsonResult

GetTargetZone() public method

public GetTargetZone ( ) : System.Web.Mvc.JsonResult
return System.Web.Mvc.JsonResult

Index() public method

public Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult

IsItMyTurn() public method

public IsItMyTurn ( ) : System.Web.Mvc.JsonResult
return System.Web.Mvc.JsonResult

JoinGame() public method

public JoinGame ( string gameId, string email ) : System.Web.Mvc.ActionResult
gameId string
email string
return System.Web.Mvc.ActionResult

NewGame() public method

public NewGame ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult