Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ipetrushin/1c890a8fd38418c7eb14f3ed8bea503e to your computer and use it in GitHub Desktop.
Save ipetrushin/1c890a8fd38418c7eb14f3ed8bea503e to your computer and use it in GitHub Desktop.
Описание ошибок
Приветствие и регистрация:
Клиент: {action: "register", nickname: "Anna"}
Сервер: {status: "error", error_id: 101, error_desc: "Nickname alredy occupied"}
Сервер: {status: "error", error_id: 1, error_desc: "Internal server error"}
Вступление в игру:
Клиент: {action: "join", opponent_id:10005}
Сервер: {status: "error", error_id: 201, error_desc: "No available user with id 10005"}
Получение статуса с сервера
Клиент: {action: "get_status", opponent_id: 105, id: 231}
Сервер: {status: "error", error_id: 301, error_desc: "There are no game betwin user 105 and 231"}
Отправка данных о забранных камнях
Клиент: {action: "got_stone", data: {heap: 1, stones: 4}
Сервер: {status: "error", error_id: 401, error_desc: "You have no rights to bring stones"}
Сервер: {status: "error", error_id: 402, error_desc: "Too many stones to bring"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment