adamleesaintfrancis / spacewar

Automatically exported from code.google.com/p/spacewar
0 stars 0 forks source link

No beacons on the board #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There are cases when ImmutableState.getBeacons returns an array of zero length.

What steps will reproduce the problem?
There is no concrete way to guarentee this will happen but if you run with
multiple ships and asteroids you will eventually see that there are cases
when there are no beacons.

What is the expected output? What do you see instead?
It is my understanding that there was always going to be at least one
beacon on the board for project 1.  Instead there are cases where no
beacons exist at the current step.

What version of the product are you using? On what operating system?
The latest code from svn, I believe revision 58. I am running Java 1.5,
Eclipse 3.2, WindowsXP.

Please provide any additional information below.
-

Original issue reported on code.google.com by Stsalomo...@ou.edu on 14 Feb 2007 at 10:31

GoogleCodeExporter commented 9 years ago
This is a bug in the user code and not the codebase.  The beacons take one time 
step to respawn so you should 
just check for the presence of beacons and return a default action if none are 
there on that step.

Original comment by dramymcg...@gmail.com on 15 Feb 2007 at 3:36

GoogleCodeExporter commented 9 years ago
Changing status.

Original comment by dramymcg...@gmail.com on 15 Feb 2007 at 3:37