Skip to content

Instantly share code, notes, and snippets.

@bartubozkurt
Created November 22, 2021 12:43
Show Gist options
  • Save bartubozkurt/4ef9180489a663be5c0bdcaba51da718 to your computer and use it in GitHub Desktop.
Save bartubozkurt/4ef9180489a663be5c0bdcaba51da718 to your computer and use it in GitHub Desktop.
public class PlayerPoints {
public int totalPoints(int currentPoints, int remainingLives) {
if(currentPoints < 50)
return currentPoints+50;
return remainingLives < 3 ? currentPoints+30 : currentPoints*3;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment