function Racer.new()local F={}setmetatable(F,Racer)F.CurrentLap=1 F.Laps={}F.FinishedRace=false return F end function Racer.StartLap(y,F)y.Laps[F]=Lap.new()end function Racer.FinishLap(y,F)local t=y.Laps[F]t.LapTime=tick()-t.StartTime t.Finished=true return t.LapTime end function Racer.HasStartedLap(y,F)if F<=#y.Laps then return y.Laps[F].Started end return false end function Racer.HasFinishedLap(y,F)if F<=#y.Laps then return y.Laps[F].Finished end return false end

function Racer.new()
	local newRacer = {}
	setmetatable(newRacer, Racer)
	
	newRacer.CurrentLap = 1
	newRacer.Laps = {}
	newRacer.FinishedRace = false
	
	return newRacer
end -- Racer.new()

function Racer:StartLap(lapNumber)
	self.Laps[lapNumber] = Lap.new()
end -- Racer:StartLap()

function Racer:FinishLap(lapNumber)
	local lap = self.Laps[lapNumber]
	lap.LapTime = tick() - lap.StartTime
	lap.Finished = true
	return lap.LapTime
end -- Racer:FinishLap()

function Racer:HasStartedLap(lapNumber)
	if lapNumber <= #self.Laps then
		return self.Laps[lapNumber].Started
	end 
	return false
end -- Race:HasStartedLap()

function Racer:HasFinishedLap(lapNumber)
	if lapNumber <= #self.Laps then
		return self.Laps[lapNumber].Finished
	end
	return false
end -- Racer:HasFinishedLap()