Skip to content

Instantly share code, notes, and snippets.

@jonaslsaa
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save jonaslsaa/1c5145cfc5cfc26b0b29 to your computer and use it in GitHub Desktop.

Select an option

Save jonaslsaa/1c5145cfc5cfc26b0b29 to your computer and use it in GitHub Desktop.
ASCII Terrain Generation Version 2.0 Advanced. Made by VOX
#Made by VOX, on gist. (TheVoxcraft)
#Still has a few bugs.
#Python 2.7
print("Loading...\n\n")
import random
line1=""
line2=""
line3=""
line4=""
line5=""
line6=""
line7=""
t=0
select = random.randint(1,7)
while t < 79:
t+=1
opt = random.randint(1,8)
if opt <= 3 and select < 7:
select+=1
elif opt <= 6 and opt > 3 and select > 0:
select-=1
elif opt > 6:
pass
if select == 1:
line1+=" "
line2+=" "
line3+=" "
line4+=" "
line5+=" "
line6+=" "
line7+="#"
elif select == 2:
line1+=" "
line2+=" "
line3+=" "
line4+=" "
line5+=" "
line6+="#"
line7+="#"
elif select == 3:
line1+=" "
line2+=" "
line3+=" "
line4+=" "
line5+="#"
line6+="#"
line7+="#"
elif select == 4:
line1+=" "
line2+=" "
line3+=" "
line4+="#"
line5+="#"
line6+="#"
line7+="#"
elif select == 5:
line1+=" "
line2+=" "
line3+="#"
line4+="#"
line5+="#"
line6+="#"
line7+="#"
elif select == 6:
line1+=" "
line2+="#"
line3+="#"
line4+="#"
line5+="#"
line6+="#"
line7+="#"
elif select == 7:
line1+="#"
line2+="#"
line3+="#"
line4+="#"
line5+="#"
line6+="#"
line7+="#"
else:
#print("Error OPT: " + str(opt)) ##DEBUG
#print("SELECT: " + str(select)) ##DEBUG
t-=1
print(line1)
print(line2)
print(line3)
print(line4)
print(line5)
print(line6)
print(line7)
dummie = raw_input()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment