I am a Tokyo-based Full-Stack developer specializing in React. I enjoy working with and learning new technologies in an effort to always be improving my own skills.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Browser | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onInput, onClick) | |
import String | |
import Char | |
-- MAIN |
Your task is to write a function for calculating the score of a 10 pin bowling game. The input for the function is a list of pins knocked down per roll for one player. Output is the player's total score.
A game consists of 10 frames. In each frame the player rolls 1 or 2 balls, except for the 10th frame, where the player rolls 2 or 3 balls. The total score is the sum of your scores for the 10 frames
- If you knock down fewer than 10 pins with 2 balls, your frame score is the number of pins knocked down