NNTP-Posting-Date: Sun, 24 Feb 2013 10:29:49 -0600 Date: Sun, 24 Feb 2013 16:29:46 +0000 From: lipska the kat <"nospam at neversurrender dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: BlueJ don't know what i did wrong References: <638ed624-9eba-44eb-bcbf-68466e5bb5f1@googlegroups.com> <42d76fca-d365-4030-ae8c-07a806eab87c@googlegroups.com> In-Reply-To: <42d76fca-d365-4030-ae8c-07a806eab87c@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 33 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-EGoxAsBJQJIbWkxunzQ6af9Gd/y1pDlIWJahVbiMbQVqTL7wQ4zyReM2FZZOzv3YK4S+vEP3v1k4lYw!1M2hqPoiOJcH6BcJws6yHuzYarZ9SfWf4hqk5K8uAFI0lH3KcF84LthYlNN7upNFG3Tcc9CeYUc= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2238 Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail Xref: csiph.com comp.lang.java.programmer:22480 On 24/02/13 10:27, marvin.radke@htp-tel.de wrote: > I hope that is what you meant by making it easierr to read: What is the point of the stillthere[] array ? You initialise this array to all 1s apart from 3 cells which you initialise to 2 There are 2 places in the code where you decrement the values stored in stillthere stillthere[k]=stillthere[k]-1; and stillthere[help[whohelps]]= stillthere[help[whohelps]] -1; if you remove these two lines the program runs to completion with 4, 400 and 4000 players if you leave one or both of these lines in, sooner or later every cell in stillthere will be set to 0 and this line will always be false if (stillthere[help[whohelps]]!=0&&whohelps!=assisting[k]+1+helpstillyet[k]){ What is the point of the stillthere[] array ? lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun