local entity = {}

entity.__index = entity

_data = {
  name = "p1",

  max_speed = 100.0,
  accel = 2.0,
  grip = 2.0,
  brake = 2.0,

  ui = {0, 0}
}

function entity.load(data)
  local self = setmetatable({}, entity)
  self.data = data or _data
  return self
end

function entity:update(dt)
end

function entity:draw()
  love.graphics.push()
  love.graphics.print(string.format("Name : %s", self.data.name, self.data.ui[1], self.data.ui[2]))
  love.graphics.print(string.format("Max Speed : %s", self.data.max_speed), self.data.ui[1], self.data.ui[2] + 20)
  love.graphics.print(string.format("Accel : %s", self.data.accel),self.data.ui[1], self.data.ui[2] + 40)
  love.graphics.print(string.format("Grip : %s", self.data.grip), self.data.ui[1], self.data.ui[2] + 60)
  love.graphics.print(string.format("Brake : %s", self.data.brake), self.data.ui[1], self.data.ui[2] + 80)
  love.graphics.pop()
end



return entity
