public void NewShotIfNotServe() { if (shotHistory.Count == 0) { return; } currentPlayerShooting = (currentPlayerShooting == 0) ? 1 : 0; Shot shot = ShotMaker.CreateShot(currentPlayerShooting, currentShot, advantage, shotHistory[shotHistory.Count - 1].type); currentShot = shot; }
public Point(Score score, PointHistory history) { shotHistory = new List <HistoryShot>(); pointOver = false; advantage = new Advantage(); //TODO TOSS RIGHT THERE if (history.FirstPoint()) { currentPlayerServing = 0; Serve serve = ShotMaker.CreateServe(currentPlayerServing, score); currentShot = serve; } else { currentPlayerServing = history.GetLastPointWinner(); Serve serve = ShotMaker.CreateServe(currentPlayerServing, score); currentShot = serve; } }
public (ShotCoord, ShotCoord) GetServingPositions(Score score) { return(ShotMaker.GetPlayerIntialPositions(currentPlayerServing, score)); }