Skip to content

Commit

Permalink
Ajustement du positionnement des pixels
Browse files Browse the repository at this point in the history
Arondi du nombre de pixel d'une case
  • Loading branch information
antoinech2 committed Mar 11, 2020
1 parent fb0a212 commit 932303c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion map_drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
############################################
#Importation des modules:
import pygame
import math

############################################
#definition des constantes :
Expand All @@ -25,7 +26,7 @@
############################################
#definition de la fonction d'affichage :
def ShowMap (map_size,path_coords):
box_size_pixel=((map_size_pixel[0]/map_size[0]),(map_size_pixel[1]/map_size[1]))
box_size_pixel=(math.floor(map_size_pixel[0]/map_size[0]),math.floor(map_size_pixel[1]/map_size[1]))
map_surface=pygame.Surface(map_size_pixel)
for column in range (1,map_size[0]+1):
for row in range (1,map_size[1]+1):
Expand Down

0 comments on commit 932303c

Please sign in to comment.