#include <u.h>
#include <libc.h>
#include <thread.h>
#include <draw.h>
#include <keyboard.h>
#include <mouse.h>
#include <igo.h>
extern char goban[Bansz+1][Bansz+1];
int verbose;
int mainstacksize = 2*Stacksz;
extern Channel *ifcchan;
extern Keyboardctl *keyboardctl;
extern Mousectl *mousectl;
void
threadmain(int argc, char **argv)
{
verbose=0;
ARGBEGIN {
case 'v':
verbose=1;
break;
default:
fprint(2," badflag('%c')", ARGC());
sysfatal("Bad args");
} ARGEND
ifcchan=chancreate(sizeof(Move*),0);
keyboardctl = initkeyboard(nil);
if ( keyboardctl == nil )
sysfatal("initkeyboard");
mousectl = initmouse(nil, screen);
if ( mousectl == nil )
sysfatal("initmouse");
threadcreate(ifcthread, nil, Stacksz);
threadcreate(inthread, nil, Stacksz);
threadexits(0);
}
|