Compare commits

...

3 Commits

Author SHA1 Message Date
randomuser 4f763c8879 add assets to git repo 2021-05-24 23:36:57 -05:00
randomuser 8ae1380f47 add see also section 2021-05-24 23:35:05 -05:00
randomuser 5c196b20c7 add the dimensions parameter to the board 2021-05-24 23:32:59 -05:00
4 changed files with 14 additions and 1 deletions

12
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
@ -84,6 +89,13 @@ warnings
- do not make your bot too spammy, this could make you get
banned from the instance
see also
--------
- https://www.youtube.com/watch?v=cREl1kB6hRs
- https://twitter.com/SnakeGameBot
- https://tilde.zone/web/accounts/136905
license
-------

BIN
assets/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
assets/profile.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

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()