Bot-Man-Toe/server.py

30 lines
528 B
Python

"""
This module enables a user to host a server that is able to play games.
"""
from __future__ import annotations
import agents
from pyserver import PyServer
def main() -> int:
"""
Start a server.
:return: Exit code
:rtype: int
"""
player = PyServer(agents.AgentOfChaos())
# Start listening for games
player.start(
host="0.0.0.0", # Comment out when using only locally
port=5000,
)
return 0
if __name__ == "__main__":
raise SystemExit(main())