diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 03047da..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbcb043 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea/ +__pycache__/ +.DS_Store/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2c52cd8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3 + +WORKDIR /app + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD [ "python", "./server.py" ] \ No newline at end of file diff --git a/README.md b/README.md index 521db44..c4c71a2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ![logo](/evolution_logo.png) + ## Evolution Game Server version 0.1.1 @@ -11,3 +12,12 @@ version 0.1.1 ## Bugs - HTTP 500 code after beginning game +- add test.py for server testing + +## Bugs +- no turns changing + +## Development guide +1. Install docker +2. Run `docker build -t evolution-server .` to build docker image +3. Setup project sdk and run configuration in pycharm/idea diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/server.py b/server.py index 307de99..f7cbe61 100644 --- a/server.py +++ b/server.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import argparse from game import Game from room import Room @@ -7,12 +5,12 @@ from player import Player import creature, ability import os -from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler +from http.server import HTTPServer, BaseHTTPRequestHandler import json #from exceptions import EvolutionServerException class Server: - Server.version = "0.1.1" + VERSION = "0.1.1" # wtf? def __init__(self): # why can't i leave it empty?