improcket/js/graphics/ship.mjs
2018-03-03 00:04:17 +00:00

12 lines
297 B
JavaScript

import {canvas, context} from './index.mjs';
import * as assets from '../assets.mjs';
import * as world from '../world/index.mjs';
export function render() {
world.ships.forEach(renderShip);
}
function renderShip(ship) {
context.fillStyle = 'red';
context.fillRect(ship.x, ship.y, 10, 10);
}