add the dimensions parameter to the board

This commit is contained in:
randomuser 2021-05-24 23:32:59 -05:00
parent 6957170b89
commit 5c196b20c7
2 changed files with 7 additions and 1 deletions

5
README
View File

@ -68,10 +68,15 @@ installation
token = '<your access token>'
host = '<your instance name here>/'
dimensions = (5, 5)
make sure that a forward-slash proceeds the host; otherwise
the software will not work correctly.
for 'dimensions', it is simply the x-y measurements of the
board. negative numbers are not tested for, nor are
fractional numbers.
- start up the software
run main.py as 'python3 main.py', or, if your system is

View File

@ -8,13 +8,14 @@ from mastosnake import Mastosnake as mastosnake
from snake import Snake as snake
from config import token
from config import host
from config import dimensions
postend = 'api/v1/statuses'
getend = 'api/v1/polls/'
auth = {'Authorization': 'Bearer ' + token }
def main():
game = snake()
game = snake(dimensions[0], dimensions[1])
mastogame = mastosnake(game)
while True:
data = mastogame.returnStatus()