1
0

Made trajectory points bigger

This commit is contained in:
neviyn 2020-07-21 19:30:43 +01:00
parent 7fdb5faeaf
commit 06f6e8221f

View File

@ -19,6 +19,14 @@ when isMainModule:
let colour = colour(1, 0, 0)
while projectile.position.x >= 0 and projectile.position.x < 800 and projectile.position.y >= 0 and projectile.position.y < 600:
world.writePixel(projectile.position.x, 600 - projectile.position.y, colour)
if(projectile.position.x + 1 < 800):
world.writePixel(projectile.position.x + 1, 600 - projectile.position.y, colour)
if(projectile.position.x - 1 >= 0):
world.writePixel(projectile.position.x - 1, 600 - projectile.position.y, colour)
if(600 - projectile.position.y - 1 >= 0):
world.writePixel(projectile.position.x, 600 - projectile.position.y - 1, colour)
if(600 - projectile.position.y + 1 < 600):
world.writePixel(projectile.position.x, 600 - projectile.position.y + 1, colour)
projectile = projectile.tick(environment)
writeFile("output.ppm", world.toPPM())