| 6.170 |
Laboratory in Software Engineering
Spring 2002
Final Project (Gizmoball) Amendment: Reactor Gizmos
|
Handout F4
Contents:
Background
The 6.170 staff has enjoyed using your initial implementation, but
wants to introduce the fission and fusion of balls.
You will extend Gizmoball to support reactor gizmos, which will delete
and create balls from your board while a gizmoball game is running.
The intent of this amendment is to test the extensibility of your
exisiting design and your group's ability to adapt to requirements
changes.
Reactor Gizmo
A reactor gizmo is similar to a circle bumper in appearance and an
absorber in function. Reactor gizmos can participate in gizmo
connections just like other gizmos.
A ball will enter a reactor gizmo and remain there for a two second period. Reactor gizmos demonstrate properties of:
- Fission: where the ball is split in to n balls, where n >= 2.
- Fusion: where multiple balls are fused in to a single ball.
Fission and fusion occur depending on the entrance of other balls in to the reactor gizmo, see below.
Detailed Requirements
The Detailed Requirements
(Appendix 1) section of the original specifications are amended as
follows.
Reactor Gizmo
A circular shape with a diameter 1L. Reactor gizmos should be
visibly distinguishable from circle bumpers.
Trigger: generated whenever the ball hits it
Coefficient of reflection: 0
When a ball hits a reactor gizmo, the ball remains in the reactor gizmo
for a waiting period of 2 seconds.
- If no ball enters the reactor gizmo
during that period, fission of the ball occurs, and it is split in to n balls,
where n >= 2. The balls exit the reactor gizmo at arbitrary angles.
- For every ball that enters the reactor gizmo during that period, the
2 second timing interval is reset. As soon as no balls enter the reactor
gizmo for a 2 second time period, fusion occurs, and only one ball exits
the reactor.
File Format
In order to accommodate the new type of gizmo, the file
format has also been amended. We introduce a new command to allow
the creation of reactor gizmos.
Reactor gizmos are created using the Reactor
command, which is similar to the Circle command.
Formally, the syntax
and semantics of
the file format is amended as follows:
Syntax Amendment
(remember that the file-format is case-insensitive)
<command> ::= ... (same as previously, except add) ...
Reactor <name> <int-pair>
Semantics Amendment
-
-
"Reactor" (IDENTIFIER name) (INTEGER x) (INTEGER y)
-
Creates a Reactor Gizmo named name with its upper left-corner at
(x,y) and diameter of 1L.
You should specify and document the semantics of the remaining
commands and test accordingly.
Sample Boards
Here is a sample board that makes use of the new syntax.
Ambiguities
Parts of this amendment have been left intentionally vague. It is
up to you to decide what (if any) clarifications are necessary. You
should include any changes to your Revised Specification documentation
in your final submission on May 13.
Design Decisions
Spend some time thinking about the best way to incorporate this change
into your design. In your final design write-up, be sure to discuss
the changes to your initial design (and the relevant trade-offs).
You will be graded on how easily your initial design can support the
amendment, and how cleanly you incorporate the amendment into your design.
Change Log
This section will detail the changes made during revisions of this
handout. You may use the version number at the bottom of your
hardcopy to determine what has changed since you printed this handout.
Back to the problem sets page.
For problems or questions regarding this page, contact:
6.170-webmaster@mit.edu.
$Id: amendment.html,v 1.5 2002/05/01 07:03:09 kalpak Exp $