Skip to content

Instantly share code, notes, and snippets.

@matdombrock
Last active February 8, 2018 23:07
Show Gist options
  • Save matdombrock/4a00a280b29eced158fe523c47a8ee45 to your computer and use it in GitHub Desktop.
Save matdombrock/4a00a280b29eced158fe523c47a8ee45 to your computer and use it in GitHub Desktop.
def GenMatrix(row,col):
Matrix = [["+" for x in range(col)] for y in range(row)]
return Matrix
#world descriptions
def RenderWorld(world, world_shape):
for cur_row in range(world_shape[0]):#c
line = ""
for cur_col in range(world_shape[1]):#r
#print(Matrix[x][y])
line += str(world[cur_row][cur_col])
print(line)
#print(Matrix[0][0])
world_shape = [16,32]#rowns, cols
world = GenMatrix(1080,1080)
world[1][1]="X"
RenderWorld(world,world_shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment