/* $Id: Client.h,v 1.12 1996/10/12 08:38:15 swetland Exp $
**
** Client header file
**
** Copyright 1996, Brian J. Swetland <swetland@uiuc.edu> and ACM@UIUC.
** Free for non-commercial use.  Share and Enjoy!
*/

#ifndef _CLIENT_H
#define _CLIENT_H

#include "Events.h"
#include "GameObject.h"
#include "Socket.h"
#include "Message.h"

class Client : public MessageHandler
{
    TeamSuper *team;

    MessageSocket *connection;
    EventLoop *el;

    Word myid;

    void DoEnemy(Word shipid, Word star, Word hyperstar, Word power,
                 Word lastseen, Byte flags);
    void DoShip(Word shipid, Word star, Word eta,
                Word power, Word engines, Word shields, Word weapons,
                Word transport, Word flags);
    void DoStar(Word starid, Word flags,
                Word x, Word y, Word c, lCnxn *list);
    void DoFlags(Word starid, Word flags);
    
    void DoTurn(Word year);    

public:
    Client(TeamSuper *the_team, MessageSocket *ms);
    void Receive(int src, int dst, Message *msg);
    void Run(void);
};

#endif /* _CLIENT_H */

