local reap = require("lib.reap")

local BASE = reap.base_path(...)

local world = require("love_src.wrapper.Concord.world")

local debug_entity = require("love_src.src.world.common.template.debug_entity")
local racer = require("love_src.src.world.top_down_race.template.racer")
local wm = require("world_map")

local wrapper = world:extend()

local name = "top_down_race"

function wrapper:new()
  wrapper.super.new(self, BASE, name)
end

function wrapper:load(_args)
  wrapper.super.load(self, {
    "love_src/src/world/common/system/",
    "love_src/src/world/top_down_race/system/"
  }, {
    {
      assemblage = debug_entity.assembleDebug,
      data = {
        position = {0, 0},
        label = name
      }
    },
    {
      assemblage = racer.assemble,
      data = {
        velocity = {0.0, 0.0},
        forward = {0.0, 0.0},
        max_speed = 1.0,
        min_speed = 0.0,
        inertia = {0.0, 0.0},

        accel = 0.1,
        brake = 0.1,
        grip = 0.0,
        steer = 0.1,
        mass = 0.0,
        streamline = 0.0
      }
    }
  })
end

return wrapper
