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 = {
        accel = 10.0,
        brake = 10.0,
        grip = 10.0,
        max_speed = 100.0,
        steer = 10.0,
        velocity = 10.0,
        decel = 2.0,
        drag = 2.0
      }
    }
  })
end

return wrapper
