Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

testserversnakebite.h

00001 /***************************************************************************
00002  * The contents of this file are subject to the Mozilla Public             *
00003  * License Version 1.1 (the "License"); you may not use this file          *
00004  * except in compliance with the License. You may obtain a copy of         *
00005  * the License at http://www.mozilla.org/MPL/                              *
00006  *                                                                         *
00007  * Software distributed under the License is distributed on an "AS         *
00008  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or              *
00009  * implied. See the License for the specific language governing            *
00010  * rights and limitations under the License.                               *
00011  *                                                                         *
00012  * The Original Code is Game Network Framework (GaNeF).                    *
00013  *                                                                         *
00014  * The Initial Developers of the Original Code are                         *
00015  * Lars Langer and Emanuel Greisen                                         *
00016  * Copyright (C) 2005. Lars Langer & Emanuel Greisen                       *
00017  * All Rights Reserved.                                                    *
00018  *                                                                         *
00019  * Contributor(s):                                                         *
00020  *   none yet....                                                          *
00021  *                                                                         *
00022  ***************************************************************************/
00023 #ifndef TESTSERVERSNAKEBITE_H
00024 #define TESTSERVERSNAKEBITE_H
00025 
00026 #include "../Ganef/server/serverdata.h"
00027 
00028 /**
00029  * @cond EXCLUDEDTESTSOURCES
00030  * @author Lars Langer and Emanuel Greisen
00031  */
00032 class TestServerSnakeBite : public ServerData
00033 {
00034    private:
00035       double m_x_dest,m_y_dest;
00036       double m_x,m_y;
00037       double m_angle;
00038       bool m_is_head;
00039    public:
00040       Client * m_owner;
00041       TestServerSnakeBite * m_nextbite;
00042 
00043    public:
00044       TestServerSnakeBite(ServerFramework * f, int x, int y, double angle, TestServerSnakeBite * nextbite, bool is_head, Client * owner);
00045       ~TestServerSnakeBite();
00046 
00047    public:
00048       void updateMovement();
00049       Client * getOwner(){ return m_owner; };
00050       inline bool isHead() const { return m_is_head; };
00051       double dist(const TestServerSnakeBite & bite) const;
00052 
00053    public:
00054       virtual const unsigned int getClassId() const { return 424242; };
00055       virtual void fillUpdatePacket(ServerPacket * packet, unsigned char type) const;
00056       virtual void fillCreateObjectPacket(ServerPacket * packet) const;
00057       virtual void clientPacket(Client * client, unsigned char type, ServerPacket * packet);
00058 
00059 };
00060 
00061 #endif
00062 /// @endcond

Generated on Mon Feb 6 12:24:50 2006 for Ganef by  doxygen 1.4.4