Skip to content

Instantly share code, notes, and snippets.

@BensonMuriithi
Forked from KHerb/gameboard.py
Last active July 30, 2016 13:39
Show Gist options
  • Save BensonMuriithi/24cde0031cf7fb94fa68fc62083d7cac to your computer and use it in GitHub Desktop.
Save BensonMuriithi/24cde0031cf7fb94fa68fc62083d7cac to your computer and use it in GitHub Desktop.
Gameboard Generator
"""Gameboard Generator"""
columns = int(raw_input("How many columns do you want on your gameboard? "))
rows = int(raw_input("How many rows do you want on your gameboard? "))
def gameboard(columns,rows):
column = []
height = []
for i in range(columns):
column.append(" |")
for i in range(columns):
height.append(" ---- ")
print "".join(height)
for i in range(rows):
print "|" + "".join(column)
print "".join(height)
return column,height
gameboard(columns,rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment