-
-
Save BensonMuriithi/24cde0031cf7fb94fa68fc62083d7cac to your computer and use it in GitHub Desktop.
Gameboard Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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