add the dimensions parameter to the board
This commit is contained in:
parent
6957170b89
commit
5c196b20c7
5
README
5
README
|
@ -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
|
||||
|
|
3
main.py
3
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()
|
||||
|
|
Loading…
Reference in New Issue