@Override
        protected void onTextMessage(CharBuffer charBuffer) throws IOException {
            String message = charBuffer.toString();
            if ("west".equals(message)) {
                snake.setDirection(Direction.WEST);
            } else if ("north".equals(message)) {
                snake.setDirection(Direction.NORTH);
            } else if ("east".equals(message)) {
                snake.setDirection(Direction.EAST);
            } else if ("south".equals(message)) {
                snake.setDirection(Direction.SOUTH);
            }
        }