Compare commits
3 Commits
6957170b89
...
4f763c8879
Author | SHA1 | Date |
---|---|---|
randomuser | 4f763c8879 | |
randomuser | 8ae1380f47 | |
randomuser | 5c196b20c7 |
12
README
12
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
|
||||
|
@ -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
|
||||
-------
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
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