C# Class BattleShip.Core.Game

Show file Open project: pebblecode/HackShips Class Usage Examples

Public Methods

Method Description
Game ( string name, Player initiatingPlayer, Player acceptingPlayer, double playerTargetZoneRadius, double shotBlastRadius ) : System
TakeShot ( Player playerTakingShot, GeoCoordinate shotLocation ) : ShotResult

Private Methods

Method Description
GetGeoDistanceBetween ( GeoCoordinate first, GeoCoordinate second ) : double
LastShotWasHit ( ) : bool
ShotOnTarget ( Player targetPlayer, GeoCoordinate shotLocation ) : bool
ShotOutsideTargetZone ( Player targetPlayer, GeoCoordinate shotLocation ) : bool

Method Details

Game() public method

public Game ( string name, Player initiatingPlayer, Player acceptingPlayer, double playerTargetZoneRadius, double shotBlastRadius ) : System
name string
initiatingPlayer Player
acceptingPlayer Player
playerTargetZoneRadius double
shotBlastRadius double
return System

TakeShot() public method

public TakeShot ( Player playerTakingShot, GeoCoordinate shotLocation ) : ShotResult
playerTakingShot Player
shotLocation GeoCoordinate
return ShotResult