/// <summary> /// Toggle shot mode based on current mode and club. /// </summary> public void Toggle() { ClubType clubType = game.GetBag().GetClub().GetClubType(); if (mode == Mode.NORMAL) { mode = Mode.POWER; } else if (mode == Mode.POWER) { if (clubType.GetClubClass() == ClubClass.WEDGE) { mode = Mode.APPROACH; } else { mode = Mode.NORMAL; } } else if (mode == Mode.APPROACH) { mode = Mode.NORMAL; } else { throw new Exception("Unexpected shot Mode"); } }
/// <summary> /// Validate that shot mode and club combo is valid. Correct otherwise. /// </summary> public void Validate() { ClubType clubType = game.GetBag().GetClub().GetClubType(); if (mode == Mode.APPROACH && clubType.GetClubClass() != ClubClass.WEDGE) { mode = Mode.NORMAL; } }
public ClubClass GetClubClass() { return(type.GetClubClass()); }