Implemented more advanced encodedMove method.