#!/usr/bin/env ruby

require 'highline/import'
require 'formatador'
require 'bowling'


game = Bowling::Game.new

Formatador.display_line "[green]=== Starting Game ===[/]"

game.frames.each_with_index.map do |frame, i|
	frame.balls.each_with_index.map do |ball, j|
		ball.knocked_pins = ask( 
			" - Score for frame #{i+1} ball #{j+1}?", Integer
		){ |q| 
			q.default = 0
			q.in = 0..10
		}
	end
end

Formatador.display_line "[red]=== Total Game Score: #{game.score} ===[/]"


