From 5c196b20c73735f170591e7329ac6e3d30ebe1b5 Mon Sep 17 00:00:00 2001 From: randomuser Date: Mon, 24 May 2021 23:32:59 -0500 Subject: [PATCH] add the dimensions parameter to the board --- README | 5 +++++ main.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README b/README index 5efc3f0..71be08e 100644 --- a/README +++ b/README @@ -68,10 +68,15 @@ installation token = '' host = '/' +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 diff --git a/main.py b/main.py index baa1448..d703051 100755 --- a/main.py +++ b/main.py @@ -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()