/*************************************************************************** * The contents of this file are subject to the Mozilla Public * * License Version 1.1 (the "License"); you may not use this file * * except in compliance with the License. You may obtain a copy of * * the License at http://www.mozilla.org/MPL/ * * * * Software distributed under the License is distributed on an "AS * * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * * implied. See the License for the specific language governing * * rights and limitations under the License. * * * * The Original Code is Game Network Framework (GaNeF). * * * * The Initial Developers of the Original Code are * * Lars Langer and Emanuel Greisen * * Copyright (C) 2005. Lars Langer & Emanuel Greisen * * All Rights Reserved. * * * * Contributor(s): * * none yet.... * * * ***************************************************************************/ #ifndef TESTSERVERSNAKEBITE_H #define TESTSERVERSNAKEBITE_H #include "../Ganef/server/serverdata.h" /** * @cond EXCLUDEDTESTSOURCES * @author Lars Langer and Emanuel Greisen */ class TestServerSnakeBite : public ServerData { private: double m_x_dest,m_y_dest; double m_x,m_y; double m_angle; bool m_is_head; public: Client * m_owner; TestServerSnakeBite * m_nextbite; public: TestServerSnakeBite(ServerFramework * f, int x, int y, double angle, TestServerSnakeBite * nextbite, bool is_head, Client * owner); ~TestServerSnakeBite(); public: void updateMovement(); Client * getOwner(){ return m_owner; }; inline bool isHead() const { return m_is_head; }; double dist(const TestServerSnakeBite & bite) const; public: virtual const unsigned int getClassId() const { return 424242; }; virtual void fillUpdatePacket(ServerPacket * packet, unsigned char type) const; virtual void fillCreateObjectPacket(ServerPacket * packet) const; virtual void clientPacket(Client * client, unsigned char type, ServerPacket * packet); }; #endif /// @endcond