function load_images() --Graphic Sprites sprites = {}; sprites["robot"] = love.graphics.newImage("sprites/robot_sprite.png"); sprites["player"] = love.graphics.newImage("sprites/player_sprite.png"); sprites["robot scrap"] = love.graphics.newImage("sprites/robot_scrap_sprite.png"); --Text Strings strings = {}; strings["no news"] = "Robots begin to attack! Runnnnnnnnn!"; strings["bad news"] = "Oh noes! Game Over!"; strings["good news"] = "Yay! You've Won!"; strings["user options"] = "qwe/asd/zxc to move. (T)eleport. (L)eave. (R)estart."; end function love.draw() --Sprite Drawer local function draw_sprite(sprite, location) A = convert(location); love.graphics.draw(sprites[sprite], A.x * cell_width + offset_x, A.y * cell_height + offset_y); end --Graphics Constants cell_width = 25 cell_height = 25; offset_x = 20; offset_y = 100; --Draw User Interface love.graphics.print(strings["user options"], 50, 50); --Draw Game Status if not (game_status == nil) then love.graphics.print(strings[game_status], 50, 730); end --Draw Game Board Grid love.graphics.setColor(255, 255, 255, 255); for i = 0, _W do love.graphics.line(offset_x + i*cell_width, offset_y + 1, offset_x + i*cell_width, offset_y +_H*cell_height); end for j = 0, _H do love.graphics.line(offset_x + 1, offset_y + j*cell_height, offset_x + _W*cell_width, offset_y + j*cell_height); end --Draw The Robots (and scrap) for i,v in ipairs(R) do if (count(R, v) > 1) then draw_sprite("robot scrap", v); else draw_sprite("robot", v); end end --Draw Player draw_sprite("player", POS); end function love.update(dt) end