Path: news.cs.au.dk!news.net.uni-c.dk!uninett.no!news-feed.ifi.uio.no!ifi.uio.no!not-for-mail From: Alf-Ivar Holm Newsgroups: comp.lang.beta Subject: Re: tron - X11 multi-player game (Long) Date: 01 Aug 2000 18:12:28 +0200 Organization: The Department of Informatics, University of Oslo, Norway Lines: 24 Message-ID: References: <8cccd8$dr4l4$1@xinwen.cs.au.dk> NNTP-Posting-Host: naglfar.ifi.uio.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: maud.ifi.uio.no 965146348 4024 129.240.64.54 (1 Aug 2000 16:12:29 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 1 Aug 2000 16:12:29 GMT User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 Xref: news.cs.au.dk comp.lang.beta:12538 The other day I was discussing the "AutoInit" pattern that I used in the tron game. Someone else posted here some years ago, but I've lost the reference. Anyone remember who posted that magic code? Must have been some hardcore Beta hacker! (Hmmm, I didn't even mention that I've stolen it in the program either. Sorry, someone!) Anyway, I took a look at tron.bet again and I saw there was a small feature/bug that may be fixed: The "Enumeration" pattern don't need to be a sub-pattern of "AutoInit", only "value" need to be. The "Enumeration" pattern should therefore look like this: Enumeration: (# (* Enumeration *) nextValue: @integer; value: AutoInit (# v:@integer; init::(# do nextValue->v; nextValue+1->nextValue #); exit v #); #); Note: This doesn't change the behaviour of anything, just makes the program a little less unreadable. Affi