xterm window for input
robowindow.o contains code for window management
Display *init_window(argc, argv, wscale) : opens and
initializes the display window, with (float) wscale scaling factor and returns a pointer to the X
display in use.
process_event() : handles X events related to the
display window.
update_player(id, name) : adds a new player id to
name mapping for the display labeling function.
update_window(nobj, status) : redraws the display
window according to the new status (received from the Robowar
server).
init_windowinit_window
-display
Display type:
#include <X11/Xlib.h> Display *dpy; dpy = init_window(argc, argv, wscale);
process_eventXPending is true
while (XPending(dpy))
process_event();
XPending is in X library
update_playerupdate_player manages list of players; your client
just passes in changes
update_windowrobowindow.o, math and X libraries
gcc ${CFLAGS} -o player player.o \
/home/brian/cse342/bin/robowindow.o -lX11 -lm -L/usr/openwin/lib