Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
ECOLOGICAL EDUCATIONAL GAME
Document Type and Number:
WIPO Patent Application WO/2004/069355
Kind Code:
A2
Abstract:
An educational game that can be implemented either as a board game or a computer game teaches the manner in which species populations change as a result of environmental events such as wildfires, floods, drought, disease and plant death. Game pieces (41-46) representing particular plants or animals move along a track of game piece positions (12) in accordance with their characteristics traits when game cards (30 and 32) representing environmental events are turned face-up. Other occurrences listed on a number of the game piece positions (18, 20, 22, 24, 26, 28) along the track affect the plant or animal representing game piece by moving it forward or backward depending on whether the occurrence is beneficial or adverse. When the organisms represented by the pieces (41-46) land on the same space, the interaction must be resolved. An interaction card (35) is turned over that indicates how the interacting organisms affect one another. The game is won when one organism reaches the finish (16). Students observe how over time, succession or community dynamics transpire.

Inventors:
ORTIZ-BARNEY ELENA (US)
BEAUCHAMP VANESSA (US)
Application Number:
PCT/US2004/002619
Publication Date:
August 19, 2004
Filing Date:
January 30, 2004
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
UNIV ARIZONA (US)
ORTIZ-BARNEY ELENA (US)
BEAUCHAMP VANESSA (US)
International Classes:
A63F3/00; A63F; (IPC1-7): A63F/
Foreign References:
US6488283B12002-12-03
US5897115A1999-04-27
US6267375B12001-07-31
Attorney, Agent or Firm:
Macblain, Thomas D. (2575 East Camelback Road Phoenix, AZ, US)
Download PDF:
Claims:
We claim:
1. A game comprising: (a) a game board, (b) multiple game pieces each representing an environmentally sensitive organism, (c) at least one listing bearing traits of the organisms represented by the pieces, (d) at least one track of game piece positions on the game board leading from a start position to a finish position, (e) a set of occurrence indicators, at least a proportion of which bear an occurrence having an environmental impact on one or more of the represented organisms, whereby at least some of the occurrences identified on the occurrence indicators have associated therewith instructions for movement of at least one of the pieces representing an organism along the track toward or away from the goal position.
2. The game according to claim 1, wherein the characters represented by the pieces are plants.
3. The game according to claim 1, wherein at least some of the occurrences identified on the occurrence indicators have associated therewith instructions for one or more of the pieces representing an organism remaining unmoved.
4. The game according to claim 1, wherein the occurrence indicators include event indicators identifying events affecting an ecosystem in which the represented organisms live, and interaction indicators identifying interactions between represented organisms coming together during the course of the game.
5. The game according to claim 1, wherein the at least one listing bearing traits of the organisms comprises a plurality of character identifying lists, each listing one or more traits of one of the represented organisms.
6. The game according to claim 5, wherein each of the plurality of character identifying lists is imprinted on a character card.
7. The game according to claim 1, wherein on the game board in association with a plurality of the game piece positions along the track are occurrences of environmental significance and associated instructions for further movement of a game piece landing on these game piece positions, including instructions for forward movement on the track for occurrences of positive environmental effect or instructions for backward movement on the track for occurrences of negative environmental effect.
8. The game according to claim 1, wherein the board designates a location for the event cards and a location for the interaction cards.
9. The game according to claim 4, wherein the events indicators identify environmental events adverse to one or more of the organisms represented by the game pieces and instructing backward movement of the corresponding one or more game pieces on the track and environmental events beneficial to one or more of the organisms represented by one or more of the game pieces and instructing forward movement of the corresponding one or more game pieces on the track.
10. The game according to claim 4 or 9, wherein the interaction indicators comprises interactions of organisms represented by the game pieces that are adverse to one or more of the interacting organisms and instructing backward movement of the corresponding one or more game pieces on the track and interactions of organisms represented by the game pieces that are beneficial to one or more of the interacting organisms and instructing forward movement of the corresponding one or more game pieces on the track.
11. The game according to claim 10, wherein at least one of the organisms represented by the game pieces is an early successional plant and at least one of the organisms represented by the game pieces is a late successional plant, the effect of an event or interaction on an organism being dependent on whether the character is early successional or late successional.
12. The game according to claim 4, wherein the events indicated on the events indicators comprise disturbances and nondisturbances.
13. The game according to claim 12, wherein the disturbances represented on the event indicators comprise one or more of wildfire, grazing and landslide.
14. The game according to claim 12, wherein the nondisturbances represented on the event indicators comprise one or more of weather, harmless insect presence and harmless animal encounters.
15. The game according to claim 1, wherein the game is a computer generated game having programming to produce representations of the board, the game pieces, the traits listings, the track and the occurrence indicators.
16. The game according to claim 15, wherein the programming produces representation of the board, the game pieces and the track on a computer display.
17. The game according to claim 15, further comprising programming representing sequential representations of the occurrences of the occurrence indicators and moving the character representing pieces as dictated by their traits.
18. The game according to claim 17, further comprising programming responsive to an entry by a computer user at a setup screen to shuffle the occurrences of the occurrence indicators to order the sequence in which they appear.
19. The game according to claim 15, further comprising programming responsive to entries by a computer user at a setup screen to determine the population of each represented organism in an ecosystem at the start of the game.
20. The game according to claim 15 or 19, further comprising programming to vary the population of each represented organism as the play of the game proceeds.
21. A computer game comprising executable code for producing: (a) at least one track of positions on a computer display leading from a start to a finish position, (b) multiple organism representations on the computer display, each signifying an environmentally sensitive organism, (c) at least one set of occurrences at least a portion of which have an environmental impact on one or more of the represented organisms, and (d) traits of the represented organisms defining each represented organism's response to the occurrences, whereby the represented organisms move forward, move backward or remain stationary on the track in response to occurrences and in dependence on their traits.
22. The computer game according to claim 21, wherein the occurrences produced by the code include events affecting an ecosystem in which the represented organisms live and interactions between represented organisms coming together during the course of the game.
23. The computer game according to claim 17, wherein the code includes programming to produce events that are disturbances of the ecosystem and events that are not disturbances of the ecosystem.
24. The computer, game according to claim 22, wherein the code includes programming to produce interactions that are adverse to one or more of the represented organisms causing backward movement of the adversely effected one or more of the organisms on the track, and interactions that are beneficial to one or more of the represented organisms causing forward movement of the beneficially effected one or more of the represented organisms on the track.
25. The computer game according to claim 24, wherein the code includes programming to produce interactions that are without effect on one or more of the represented organisms causing no movement of the unaffected one or more of the represented organisms on the track.
26. The computer game according to claim 22, wherein the code includes programming to produce benefits to at least some of the represented organisms from the effects, thereby moving those represented organisms forward on the track, and programming to produce detriment to the at least some of the represented organisms, thereby moving these represented organisms backward on the track.
27. The computer game according to claim 22, wherein the code includes programming associating beneficial occurrences and detrimental occurrences with positions along the track sending represented organisms forward and backward on the track, respectfully, when landing on those positions.
28. The computer game according to claim 27, wherein the code further comprises programming to vary the population of the represented organisms as the game proceeds.
29. The computer game according to claim 28, the code further comprising programming to enable variation of the population of the represented organisms by a computer user at the beginning of a game.
30. The computer game according to claim 28, the code further comprising programming to enable a computer user to vary the order of occurrences at the beginning of a game so that the game can proceed differently from play to play.
Description:
ECOLOGICAL EDUCATIONAL GAME Statement of Government Funding Financial assistance for this project was provided by the U. S. Government through the National Science Foundation Under Grant Number DGE0086465 and the United States Government may own certain rights to this invention.

Cross Reference to Related Applications This application claims priority from provisional patent application Serial No.

60/444,805 filed February 3,2003 in the name of Elena Ortiz-Barney et al. entitled"Board Game to Teach Plant Community Dynamics"and provisional patent application Serial No.

60/455,509 filed March 17,2003 in the name of Bhavin Ajmera et al. entitled"Floristic Relay : A Computer Game to Learn About Concepts in Ecology and Environmental Sciences, "both incorporated herein by reference.

Field of the Invention This invention relates to educational games and more particularly to educational games relating to environmental dynamics.

Background When we study ecosystems, we can separate them into the living parts and the non- living parts like rocks, water, air. The living part can be separated into the plant and animal communities. Animals in the ecosystem depend on the plant community. Plant communities change over time. These changes are called succession, or plant community dynamics. This is one of the key concepts in ecology. Most people are unaware that plant communities, on which animals depend, are always changing. Animal populations may vary as a result.

Plant community dynamics is a good example of ecosystem change that needs to be taught. Events such as wildfires, floods, drought, disease and plant death can trigger changes in the plant community. Ecologists call these events disturbances or"stresses."Disturbances change the environment. For example, after a fire there are few plants left to shade the ground and the soil gets hot. Such change in the environment leads to changes in the "composition"of the plant community. Composition refers to the number of species and how many plants of each species occur in an area.

How do changes in the environment lead to changes in the species composition of the community? As any gardener knows, different plant species respond differently to their environment. Some plants grow better in the bright sunlight, some grow well in the shade, some can survive wildfires and others cannot. These differences in plant characteristics form the basis for changes in the composition of the plant community as a whole.

Some disturbances are small, only affecting the plants in a small area. For example, if we are looking at the whole forest and a tree dies, we may not notice. But if we focus on one place in the forest, then we can see the tree die. The environment in that spot is changed.

There is now more light hitting the ground, the tree is not there to provide shade. A plant that grows well in the shade is replaced by another that needs a lot of light. Then, as the plant that needs light grows, it shades the ground. Now a plant that needs shade can grow. Over a long period of time, maybe centuries, we will see the whole forest slowly replaced by new trees.

Some disturbances are very dramatic and affect larger areas than others, as when a volcano erupts, wiping out an entire forest. After a large disturbance the environment on the mountainside is changed. The ground is covered with solid rock from the lava flows. Seeds have to travel to the area to colonize it. Usually the colonizing plants are not the same species as the plants that covered the mountain before the disturbance. The colonizers use their roots to break up the rock and they leave behind nutrients and start turning the rock to soil. These colonizing plants create a new environment that other plants can use. Other plants start taking over until eventually there is a forest that looks a lot like the forest that was there before the volcano.

Plant and animal community dynamics and succession are difficult subjects to teach.

The time periods for actual observance of these phenomena are very long. There is a need therefore for a system of teaching species dynamics and succession. While in the past there have been educational games that teach ecological principals, none have taught community dynamics and succession. It is thus an object of this invention to provide a game that does so.

Brief Description Broadly, the invention relates to a game useful to teach the dynamics of living organisms such as, without limitation, plants, mammals, fish, reptiles, birds, etc. In a described exemplary embodiment, the game is designed to be used in teaching plant community dynamics and how plant populations respond to events such as, e. g. wildfires.

However, the principles of play can be applied as well to all manner of living organisms. The

game of the invention is implemented as a true board game or a computer game. The game is valuable to teachers in upper elementary, secondary and post-secondary schools, and in interpretive centers.

In this game for four to six players, each player represents an organism, real or imaginary that comes together with the others in an ecosystem. They may or may not be distinct species. The organisms may be of the same or different genus, family or even kingdom. The object of the game is for one's organism to reach the finish line first.

Winning the game represents domination of the imaginary community by the winning player's organism.

Even though succession or plant or animal community dynamics is difficult to teach because it occurs over long periods of time and cannot be observed easily, in the game of this invention succession can occur within a class period. With this game students can observe the changes in a community of organisms. The rules of the game are based on current scientific theories of how organisms respond to disturbances such as wildfires and how organisms respond to each other.

Representations of organisms of an ecosystem are first located at a start position. The representations can be actual physical game pieces or computer representations on a display.

Occurrences of environmental significance are indicated by occurrence indicators such as a set of occurrence cards, a die with faces marked to indicate various occurrences, a spinning pointer, an arrow and spinning wheel marked to indicate the occurrences or any other game device used to bring up numbers, symbols, letters or words by chance. In a computer implementation a random number generator may be used to randomly reorder or"shuffle"the occurrences or an input by a computer user can set the sequence of occurrence appearances.

In a preferred exemplary embodiment the occurrences are"events"that impact an ecosystem and"interactions"that affect two of the organisms that come together or encounter one another in the ecosystem. Two separate occurrence indicators can be employed for the events and the interactions. Traits of the various organisms are listed, for example on "character"cards or displays distributed to or shown to the players. These traits determine how an organism will react to the various events and interactions. Further, as a represented organism advances along a track of positions leading from the start to the finish, occurrences associated with a number of the positions along the track have positive or negative effect on the organism that lands there. Events, interactions and occurrences along the way will send the organism back one or more places if detrimental to the organism's propagation and will send the organism forward one or more spaces if beneficial. Some occurrences are without

effect and an organism's position remains unchanged, all as determined by the organism traits.

As students play the game, they learn that the differing organisms respond differently to the disturbances. They also learn how the organisms interact with each other. They learn that some are better competitors and some organisms help others. These latter are called facilitators. They may notice that organisms that do well during disturbances usually lose during competition.

Among plants, examples that do well during disturbances are the early successional plants because they dominate the community soon after a disturbance occurs. Early successional plants are also known as colonizers, ruderals or weeds. They are generally annual plants, they produce many small seeds and the seeds can usually travel far carried by either wind or water. Late successional plants compete well but don't respond well to disturbances. These plants dominate only after there has been some time without disturbances. Late plants are usually perennials. They produce few, large seeds which are usually carried by animals.

Events that are disturbances may include fires, floods, grazing, mudslides, landslides, earthquakes, volcanoes, hurricanes, typhoons, droughts, severity of temperatures and any other natural or manmade disturbance affecting plants and animals. Interactions may include one plant shading another (facilitation with shade), a plant's root system adding nitrogen to the soil (facilitation with nutrients), pollination by bees or birds, distribution of seeds in feces or by burrs carried on coats of mammals, competition for water or for light among plants, symbiotic interactions, tolerance and many other effects that occur when organisms share an ecosystem.

Once students start learning how the game works, they will almost inadvertently learn about organisms in their environment and how they interact. Students can be encouraged to research local ecosystems and plant and animal communities, they can learn which disturbances are important in these ecosystems. The personnel at local National Park or Forest or State Park or other conservation agency should be knowledgeable in this area.

Using the features of this invention, students can even create their own game using the regional plants and animals.

Materials are provided to enhance education value of the game. To use the game as a lesson, students are asked to record the order of players at the end of the game and the number of each"event"card found in a"Current Events"spot on the board or computer display. They can use the worksheets to record this information and to make a diagram of the

imaginary community of organisms. There are also discussion questions, evaluation and extension activities. Also, a CD-ROM version of the game or extension can allow students to explore the dynamics of the game and the community of organisms further.

The game is designed to introduce students to the concept of succession or community dynamics among organisms. It takes advantage of students'enthusiasm and interest in playing games. A lesson uses the board game in which students represent real or imaginary organisms. Students explore community dynamics by playing the game. Each time the game is played, the students are conducting a type of experiment. Students report on the results at different points in the game. Then they discuss with the class what they have learned. To apply their new knowledge, students predict changes in the community and attempt to make the community change in specific ways. The game and lesson are adaptable to a wide variety of real and imaginary organisms.

The above and further objects and advantages of the invention will be better understood from the following detailed description of at least one preferred embodiment of the invention, taken in consideration with the accompanying drawings.

Brief Description of the Drawings Fig. 1 is a plan view of a game board for playing the game of this invention and shows a track of positions along which game pieces are moved; Fig. 2 is a plan view of a set of"event"cards, each identifying an environmental disturbance capable of affecting species of plants ; Fig. 3 is a plan view of a set of"event"cards, each identifying a benign environmental occurrence; Fig. 4 is a plan view of a set of"interaction"cards, each identifying a kind of interaction between plant species that are the subject of the game; Fig. 5 is a plan view of a set of"character"cards defining the type of plant species and its response to the various events; Fig. 6 is a representation of a worksheet that can be used by students participating in the game of the invention; Fig. 7 is a further page of the worksheet of Fig. 6 with spaces for a student's entries as the game of the invention proceeds; Fig. 8 is an exemplary starting screen for the computer game in accordance with the invention and shows a series of boxes permitting entries that can be used to vary the game;

Fig. 9 is a screen shot of a computer generated game board at the start of a game according to the invention; Fig. 10 is a screen shot of the computer generated game board of Fig. 9 following a first move in response to an environmental event; Fig. 11 is a screen shot of the computer generated game board of Fig. 9 following a second move in response to an environmental event; Fig. 12 is a screen shot of the computer generated game board of Fig. 9 following a third move in response to an interaction among characters; and Fig. 13 is a screen shot of the computer generated game board of Fig. 9 following a fourth move in response to an interaction among characters.

Detailed Description The Game Turning to the drawings in detail, there is described a specific, exemplary embodiment of the game discussed above in which the features and principals of the invention are applied to plant species. In Fig. 1 there is shown a game board 10 on which is imprinted a track 12 of game piece positions leading from a start position 14 to a finish or goal position 16. Imprinted on a number of the positions 12 are positive or beneficial occurrences as at positions 18 and 20. These direct a player whose game piece lands on that position to advance one or more further positions. In the case of positions 18 and 20, the player is advanced two positions as indicated by the"+2"designation. In the case of the exemplary embodiment of Fig. 10 the position of beneficial occurrence at each of the positions 18 and 20 is the making of seeds such as will assist in propagation of the species.

In a number of other game piece positions 22,24, 26 and 28, negative or harmful occurrences are imprinted along with directions to the player whose piece lands on that position to move backward a prescribed number of spaces. In each of the positions 22,24, 26 and 28, the player is advised to move his or her piece backward one position as indicated by the"-1" indication on the position. The negative or harmful occurrences imprinted on the positions 22 and 24 are the occurrence of a disease and on the positions 26 and 28 an attack by pests.

These negative or harmful occurrences tend to detract from the propagation of the species.

Preferably also imprinted on the game board 10 at separate positions are locations for event cards, at locations 30 and 32 and for interaction cards at locations 33 and 34. At the beginning of the game all of the event cards 31 are stacked face down on the space labeled

"Future Events. "The space labeled"Current Event"is provided for turning the top-most event card of the"Future Events"stack face up. The space 33 labeled"Interactions"receives face down a stack of interaction cards 35 to be used in the game as described below.

Exemplary event cards 31 are shown in Fig. 2 and Fig. 3. The cards of Fig. 2 and 3 identify events known to have an effect on one or more of the plants competing in the game.

The cards of Figs. 2 and 3 are gathered together and shuffled at the start of a game. The cards 35 stacked at location 33 on the board are illustrated in Fig. 4. These list the type of interaction between the plants, i. e. competition, facilitation or tolerance, for example. These also list the effect on the types of species. For example, where a late successional character type and an early successional character type meet up and compete for water, the late successional character type moves forward two while the early character type moves back one. Between like types, there is imprinted the instruction to resolve the interaction by the toss of a coin, for example. Similarly, the effects of other competitions such as that for light or for nutrients appear. Facilitation and its effects are listed on yet another card and tolerance results in the plants remaining in place. The cards 35 of Fig. 4 are gathered together and shuffled at the start of a game.

Returning to Fig. 1, also shown there on the game board 10 is a box 38 containing six pieces 41-46, each representing a plant involved in the game. They are named, respectively, Grickle Grass, Borogrove Grass, Momerath Herb, Truffula Tree, Mimsy Bush and Lorax Tree. The plants identified in this exemplary embodiment are fictional, but may be actual organisms whose actual interactions and reactions to events are understood. Shown in Fig. 5 is a series of character cards 40 that list the traits of the various plants. Each card 40 identifies one of the plants 41-46 and its character type, i. e. early successional or late successional, as well as its response to events. As can be seen from the event responses listed under each plant on the character cards 40 an event beneficial to one plant may have no effect or may be detrimental to the long term survival of another of the plants.

Game pieces 41 to 46 may be representative of the particular organisms (i. e. modeled after or portraying a particular organism) or they may be generic pieces sufficient to distinguish each from the others. Generic pieces can be used to represent any desired organism. With generic pieces the game can then be altered and not need be specific to the six organisms represented by the pieces. Generic pieces may be a white cube, a black cylinder, a red pyramid, etc.

Playing the Game The steps of playing the game are as follows: Players review the sheet, Fig. 6"What does the community look like?" Step 1: A dealer is chosen.

Step 2: The dealer shuffles the three decks 31,35 and 40 one at a time. All players, including the dealer, choose one of the game pieces 41-46 (if the pieces are generic). Game pieces are placed in the"Start"square 14.

Step 3: The dealer places event cards 31 face down in the Future Events location 50 on the playing board 10. The dealer places the interaction cards 35 face down in their location 34. The dealer deals one character card 45 to each player. (If the game pieces are specific to a species, they are distributed here. ) Step 4: Players will play with the same character card for the duration of the game.

Step 5: The dealer takes the first event card 31 from the stack at 30 and places it face up in the Current Event location 32.

Step 6: Each player then plays according to the character card 40 directions, starting, e. g. , with the dealer and going clockwise.

Step 7: After all players have their turn, the board 10 is checked for players who have landed on the same square. These players are interacting.

1. Interactions are played in the same order as events (clockwise starting at the dealer).

2. Two at a time, the interacting players draw one of the interaction cards 35 from the pile at 33 and turn it face-up at location 34.

3. The interacting players play according to the interaction card 35 drawn.

4. The interaction part of the round is over when no players are sharing squares or the species on a square are tolerant of one another.

Step 8 : Steps 5-7 are repeated until all players have left the"Start"square.

Students are then asked to write the order of the players on the worksheets, Figs. 6 and 7, titled"What does the community look like ?" and"How did the plant community change?" Steps 5-7 are repeated until a player wins by arriving at the"Finish"position. Students write the order again at the end of the game, observing how the community changed. The

worksheets of Figs. 6 and 7 call upon students to sketch in the end results of the occurrences throughout the game. The worksheets indicate the numbers of plants left of each kind. The worksheets may also contain a series of questions to be answered about succession, organism dynamics, environmental effects, etc.

Computer Edition Fig. 8 is a representation of a screen shot of the opening screen of the computerized version of the game according to the invention. Fig. 8 is a welcome screen that permits the player to choose the number and ratio of disturbance cards at boxes 51-54. Box 55 on the screen allows the player to introduce a three digit random number. A player dragging a cursor with his or her mouse or other interface and clicking on the enter button 56 shuffles each of the sets of event and interaction cards into an order dependent on the number entered at the box 55. Clicking on the enter button 56 also takes the player or players to the first game screen represented in Fig. 9.

In Fig. 9, the screen shot shown is the beginning screen. The six pieces 141-146 are depicted in the start position 114, ready to start the game. The six plants represented by the pieces 141-146 are again the fictional plants in this exemplary embodiment. A player can view a plant's character card 40 like one of those shown in Fig. 5 by dragging the cursor to the box 138 and clicking on the name of the particular plant.

To start the game, a player clicks on the"click for future events"link in the box 130.

Fig. 10 is a screen that illustrates a typical opening after clicking on"Click for Future Events. "According to their individual characteristics, the pieces have moved in response to a first event indicated at the current event location 132. As shown in Fig. 10, the event is a landslide which results in the pieces 141,142, 144 and 145 remaining unmoved. The piece 143 moved forward two spaces and the piece 146 moved forward five spaces, all as dictated by the character cards 40. Because no two pieces have landed on the same space, there is no need for an interaction card to be turned over. The"Click for Interaction"location is, in fact, inactive at this point. Play continues by clicking again on"Click for Future Events." Fig. 11 shows the effect of the next event, a sunny day. By this occurrence, the pieces 142,144 and 145 have each moved three places and now are interacting. The piece 143 has moved back one place and the piece 146 has moved forward one space.

Now the"Click for Future Events"statement in the box 130 is inactive. To proceed, the interaction must be cleared. A player drags the cursor to the now active"Click for

Interaction"in the location 133. As shown in Fig. 12, clicking upon this produces an interaction in which two of the three interacting plants tolerate one another. The late successional plant 145 and early successional plant 14 stay in place. This is indicated in the location 134 designated"Current Interaction"showing a representation of the face-up interaction card 135.

To determine the interaction of the next two interacting plants of the three, a player clicks on"click for interaction"one more time. Fig. 13 is the result. The interaction is designated"Facilitation With Shade. "Early successional species protect late successional species from heating and drying out. Therefore late successional plants take advantage and move forward two places while the early successional plant stays in place as indicated at 133.

In this case, because the two interacting plants 144 and 145 are both late successional, the computer code decides arbitrarily and moves 144. (In the true board game a coin toss is called for at such a point. ) Play may now proceed by a player dragging the cursor to"click for future events"in location 130 and clicking upon it. This brings up a further event (not shown) that affects the plants as indicated on their character cards 40 of Fig. 5. Play proceeds until one of the plants reaches the finish space 116. In the event that a plant lands on one of the spaces 118,122, 124,126 or 120, the action indicated is taken, which is to say the plant's game piece moves backward or forward the number of spaces indicated.

Of course each screen has a"Start Again"button 200 for beginning a new game, an "Exit"button 201 for exiting the game. "Show Results"button 202 may be clicked on at any moment from the beginning to the end of the game. This will bring up a results screen displaying the number of plants for each plant species which will be related to the plant species position on the board. The plant species in the first position will have the maximum number of plants, and so on, with the last plant species having the least (0 if on"Start,"1 otherwise) number of plants. The result screen also lists the rankings of the species and the number of cards for each event used up.

Programming Code The computer game is implemented in the Java programming language and Windows XP operating system. Code for the game follows.

Card. java import java. awt. * ; import java. awt. image. * ; public class Card { String text ; Image image ; String event ; public Card (String text, String event, Image image) { this. text = text ; this. event = event ; this. image = image ; } public void draw (Graphics g, int x, int y, ImageObserver observer) { g. drawString (text, x+10, 25) ; g. drawString (event, x+10, 40) ; if (image ! = null) { g. drawImage (image, x+10, y, 140, 95, observer) ; } } } CardStaclc. j ava CardStackjava import java. awt. * ; import java. awt. event. * ; import j avax. swing. * ; import java. util. * ; import java. net. * ; public class CardStack extends JPanel implements MouseListener { Stack open, closed ; JApplet parent ; //Image wildfirehnage ; public static int cardNumbers [] ; public static int seed = 0 ; final int fire = 0 ; final int landslide = 1 ;

final int grazing = 2; final int nodist = 3; int nodistcards =-1; int numgrazing =-1 ; int numCards [] = {0, 0,0, 0,0, 0,0, 0,0, 0}; boolean first = true; String properties [] = {"butterflyjpg : Butterfly flies by: No Disturbance: 4", "bearjpg : Bear eats berries: No Disturbance : 4","cloudy. jpg : Cloudy day: No Disturbance: 4", "rain2.jpg : Rainy day: No Disturbance: 4","bee. jpg : Bee buzzes by: No Disturbance : 4", "sun. jpg : Sunny day: No Disturbance: 4","cow2 jpg: Animals grazing: Grazing Event: 4", "gazelle2.jpg : Animals grazing: Grazing Event: 4","landslide2 jpg: Landslide: Landslide Event: 8","fire. jpg : Wildfire: Fire Event: 8"} ; public CardStack(JApplet applet) <BR> <BR> {<BR> parent = applet; open = new Stack(); closed = new Stack () ; cardNumbers = new int [4]; for (int i=0 ; i<4 i++) { cardNumbers [i] = 0; } setBackground (Color. white); //Toolkit toolkit = Toolkit. getDefaultToolkit () ; //setBorder (BorderFactory. createLineBorder (Color. red) ) ; addMouseListener (this); } public void close() <BR> <BR> {<BR> while(!open.empty()) { closed. push (open. pop ()) ; } repaint () ; } public void init() <BR> <BR> {<BR> MediaTracker tracker = new MediaTracker(this); System. out. println ("numgrazing"+numgrazing+"numcards [6] "+numCards [6] ) ; if (nodistcards/6 == 0) { for (int i=0 ; i<nodistcards; numCards [i++] ++); } else { for (inti=0 ; i<6 ; numCards [i++] =nodistcards/6) ; for (inti=0 ; i<nodistcards% 6; numCards [i++] ++); } if (numgrazing/2 == 0) { numCards [6] = 1; t) 53990 12

} else { intx=6 ; for (int i=0 ; i<numgrazing ; i++) { numCards [x] ++; x = (x=6) ? 7: 6; } } for (int i=0 ; i<properties. length; i++) { StringTokenizer tokens = new StringTokenizer (properties [i]," :") ; String imageName = tokens. nextToken () ; Image image = null ; try { image = parent. getlmage (new URL (parent. getCodeBase (), imageName)) ; tracker. addlmage (image, i); } catch (Exception e) { System. out. println ("Bad URL, Image not loaded"); } String text = tokens. nextToken () ; String event = tokens. nextToken () ; int num = numCards [i]; for (int j=0;j<num ; j++) { Card card = new Card (text, event, image); closed. push (card); } System. out. println ("Name"+text+"number"+num) ; } shuffle () ; for (int i=0 ; i<properties. length; i++) { try { tracker. waitForID (i); } catch (InterruptedException e) {} } } public void shuffle () { Random random = new Random (seed); Stack newClosed = new Stack () ; while (closed. size () > 0) { int index = random. nextlnt (closed. size () ) ; Card card = (Card) closed. elementAt (index); closed. removeElementAt (index) ; newClosed. push (card); } closed = newClosed ; } public void paint (Graphics g) { 1153990 13

super. paint (g) ; /*g. drawRoundRect (10, 50, 200, 240, 20, 20) ; g. drawRoundRect (220, 50, 200, 240, 20, 20) ; */ g. setColor (Color. green) ; g. drawRoundRect (0, 0, 150, 200, 20, 20) ; g. setColor (Color. green) ; g. drawRoundRect (155, 0, 150, 200, 20, 20) ; g. setColor (Color. red) ; g. drawString ("Current Event", 170, 215) ; g. setColor (Color. green) ; g. drawRoundRect (600, 400, 200, 250, 20, 20) ; if (closed. size () > 0) { Font font = new Font ("Times New Roman", Font. BOLD, 32) ; g. setColor (Color. red) ; g. drawString ("Click for future events", 25, 100) ; } if (open. size () > 0) { Card card = (Card) open. peek () ; card. draw (g, 155, 100, this) ; } } public void mouseClicked (MouseEvent e) { int x = e. getxo ; int y= e. getY () ; if (x > 0 && x < 150 && y > 0 && y < 200) { InteractionWaiters iWaiters = InteractionWaiters. getInteractionWaiters () ; Vector waiters = iWaiters. getWaiters () ; if (waiters. size () > 0 && ! (waiters. size () == 1 && (waiters. elementAt (0) = Welcome. beginSquare li waiters. elementAt (0) == Welcome. finishSquare)) && ! ( (waiters. size () = 2) && ( (waiters. elementAt (0) == Welcome. beginSquare && waiters. elementAt (l) == Welcome. finishSquare) 11 (waiters. elementAt (0) = Welcome. finishSquare && waiters. elementAt (l) == Welcome. beginSquare)))) { JOptionPane. showMessageDialog (this,"Please Click On an Interaction Card") ; return ; I Card card = null ; first = false ; if (closed. size () > 0) { card = (Card) closed. pop () ; open. push (card) ; Graphics g = getGraphics () ; update (g) ; //repaint () ; } if (closed. size () == 0 && first = false) {

for (int i=0 ; i<open. size () ; i++) { closed. push (open. pop ()) ; } return ; } if (card ! = null) { if (card. event. compareTo ("No Disturbance") == 0) { cardNumbers [nodist] ++ ; } if (card. event. compareTo ("Fire Event") == 0) { cardNumbers [fire] ++ ; I if (card. event. compareTo ("Grazing Event") == 0) { cardNumbers [grazing] ++ ; } if (card. event. compareTo ("Landslide Event") == 0) { cardNumbers [landslide] ++ ; } for (int i=0 ; i<6 ; i++) { Welcome. characters [i]. react (card. event) ; } System. out. println ("forming pairs") ; for (int i=0 ; i<Welcome. squaresVector. size () ; i++) { Square square = (Square) Welcome. squaresVector. elementAt (i) ; System. out. print (""+i) ; square. fonnPairs () ; } System. out. println () ; Welcome. resultPanel. dynamicUpdate (Welcome. characters) ; parent. repaint () ; if (Welcome. finishSquare. piecesVector. size () > 0) { removeMouseListener (this) ; Welcome. intStaclc. removeMouseListener (Welcome. intStack) ; String message = new String ("Game over. Winner (s) : ") ; for (int i=O ; i<Welcome. finishSquare. piecesVector. size () ; i++) { message += ( (Character) Welcome. finishSquare. piecesVector. elementAt (i)). name +"" ; } JOptionPane. showMessageDialog (this, message) ; } } } public void update (Graphics g)

{ paint(g); } public void mousePressed(MouseEvent e) { } public void mouseEntered(MouseEvent e) <BR> <BR> {<BR> <BR> <BR> <BR> <BR> } public void mouseExited (MouseEvent e) { } public void mouseReleased(MouseEvent e) { } } ==================================== Character.java import java. awt. *; public class Character <BR> <BR> <BR> {<BR> <BR> <BR> <BR> <BR> Image pieceImage ; String name; String type; String tooltipText ; int currentlndex ; //index into the squares array private final int FIRE_EVENT = 0, LANDSLIDE_EVENT = 1, GRAZING_EVENT = 2, NO_DISTURBANCE_EVENT = 3; int [] eventReaction ; public Character (String name, Image piece, String type, int [] eventReaction) { currentIndex =-1; this. name = name; this. pieceImage = piece; this. type = type; this.eventReaction = eventReaction; } public void move(int reaction) { if (reaction! = 0) { if (currentlndex = Welcome. squaresVector. size ()) { return; 1153990

) Square currentSquare = (currentIndex =-1) ? Welcome. beginSquare : (Square) Welcome. squaresVector. elementAt (currentlndex) ; currentSquare. removePiece (this) ; currentlndex += reaction ; if (currentIndex < 0) { currentIndex =-1 ; Welcome. beginSquare. putPiece (this) ; } else if (currentIndex >= Welcome. squaresVector. size ()) { currentIndex = Welcome. squaresVector. size () ; Welcome. finishSquare. putPiece (this) ; Welcome. resultPanel. addFinished (this) ; } else { currentSquare = (Square) Welcome. squaresVector. elementAt (currentIndex) ; int move = currentSquare. putPiece (this) ; if (move ! = 0) { currentIndex'+= move ; currentSquare = (Square) Welcome. squaresVector. elementAt (currentIndex) ; move = currentSquare. putPiece (this) ; } if (currentSquare ! = Welcome. beginSquare && currentSquare ! = Welcome. finishSquare) { currentSquare. fonnPairs () ; } else { if (currentSquare == Welcome. finishSquare) { System. out. println ("Game Over") ; } } } public void react (String eventType) { int reaction =-1 ; if (eventType. compareTo ("Fire Event") =0) { reaction = eventReaction [FIRE_EVENT] ; } else if (eventType. compareTo ("Grazing Event")-0) { reaction= eventReaction [GRAZING_EVENT] ; } else if (eventType. compareTo ("Landslide Event") == 0) { reaction = eventReaction [LANDSLIDE_EVENT] ; } else if (eventType. compareTo ("No Disturbance") == 0) { reaction = eventReaction [NODISTURBANCEEVENT] ; } if (reaction ! = 0) { if (currentIndex == Welcome. squaresVector. size ()) { return ; }

Square currentSquare = (currentlndex =--1) ? Welcome. beginSquare : (Square) Welcome. squaresVector. elementAt (currentW dex) ; currentSquare. removePiece (this) ; currentIndex += reaction ; if (currentIndex < 0) { currentIndex =-1 ; Welcome. beginSquare. putPiece (this) ; } else if (currentIndex >= Welcome squaresVector. size ()) { currentIndex = Welcome. squaresVector. size () ; Welcome. finishSquare. putPiece (this) ; Welcome. resultPanel. addFinished (this) ; } elsef currentSquare= (Square) Welcome. squaresVector. elementAt (currentIndex) ; int move = currentSquare. putPiece (this) ; if (move ! = 0) { currentlndex += move ; currentSquare = (Square) Welcome. squaresVector. elementAt (currentIndex) ; move = currentSquare. putPiece (this) ; } } System. out. println ("index"+currentIndex) ; } } Entry. Java import javax. swing. * ; import java. awt. * ; import java. awt. event. * ; import java. util. * ; import java. net. URL ; import java awt. image. * ; import java. applet. * ; import java. net. * ; public class Entry extends JPanel implements ActionListener { public JTextField textl, text2, text3, text4, text5 ; public JLabel labell, label2, label3, label4, label5 ; public JButton button, button2 ; //String s = <html><body><p><font size ="2"face ="Verdana">This is a paragraph. </font></p></body></html> ; public Entry () { super () ; text5 = new JTextField (" 111") ;

label5 = new JLabel () ; label5. setText ("Enter a Random number to shuffle cards") ; label5. setBounds (50, 280, 300, 20) ; text5. setBounds (420, 280, 35, 20) ; add (text5) ; add (label5) ; text2 = new JTextField ("8") ; label2 = new JLabel () ; label2. setText ("Enter ratio of Landslide Cards (beween 1 to 8)") ; label2. setBounds (50, 160, 300, 20) ; text2. setBounds (420, 160, 35, 20) ; add (text2) ; add (label2) ; text3 = new JTextField ("8") ; label3 = new JLabel () ; label3. setText ("Enter ratio of Grazing Cards (beween 1 to 8)") ; label3. setBounds (50, 200, 300, 20) ; text3. setBounds (420, 200, 35, 20) ; add (text3) ; add (label3) ; text4 = new JTextField ("24") ; label4 = new JLabel () ; label4. setText ("Enter ratio of No Disturbance Cards (beween 1 to 24)") ; label4. setBounds (50, 240, 300, 20) ; text4. setBounds (420, 240, 35, 20) ; add (text4) ; add (label4) ; setLayout (null) ; setBackground (Color. white) ; textl = new JTextField ("8") ; labell = new JLabel () ; labell. setText ("Enter ratio of Fire Cards for the this game (beween 1 to 8)") ; labell. setBounds (50, 120, 350, 20) ; textl. setBounds (420, 120, 35, 20) ; add (textl) ; add (labell) ; buttonl = new JButton ("Enter") ; buttonl. setBounds (150, 320, 100, 25) ; button. addActionListener (this) ; add (buttonl) ; button2 = new JButton ("Exit") ; button2. setBounds (300, 320, 100, 25) ; add (button2) ; }

public void paint (Graphics g) { super. paint (g) ; g. setColor (Color. blue) ; g. setFont (new Font ("Batang", Font. PLAIN, 16)) ; g. drawString ("Welcome to the Floristic Relay : The Computer Game !", 60, 60) ; //g. drawString ("We hope you enjoyed playing the board game. This computer game follows the same rules as", 60, 40) ; //g. drawString ("the board game. However, it will take a lot less time to play allowing you to experiment.", 60, 60) ; g. drawString ("You should now select how many cards of each event type you would like to play with.", 60, 80) ; //g. drawString (s, 100, 100) ; Container c = this. getTopLevelAncestor () ; } public void actionPerformed (ActionEvent e) { int seed ; try { int num = Integer. parseInt (textl. getText ()) ; if (num < 1 ll num > 8) { JOptionPane. showMessageDialog (this,"Please enter a value between 1 and 8 for fire cards") ; return ; I Welcome. cardStack. numCards [9] = num ; } catch (NumberFormatException ex) { JOptionPane. showMessageDialog (this,"Please enter integer value for fire cards") ; return ; } try { int num = Integer. parseInt (text2. getText ()) ; if (num < 111 num > 8) { JOptionPane. showMessageDialog (this,"Please enter a value between 1 and 8 for landslide cards") ; return ; I Welcome. cardStack. numCards [8] = num ; } catch (NumberFormatException ex) { JOptionPane. showMessageDialog (this,"Please enter integer value for landslide cards") ; return ; } try { int num = Integer. parseInt (text3. getText ()) ; if (num < 111 num > 8) {

JOptionPane. showMessageDialog (this, "Please enter a value between 1 and 8 for grazing cards") ; return; } Welcome. cardStack. numgrazing = num; } catch (NumberFormatException ex) { JOptionPane. showMessageDialog (this, "Please enter integer value for grazing cards"); retyurn; } try { int num = Integer. parseInt (text4. getText ()) ; if (num < 111 num > 24) { JOptionPane. showMessageDialog (this, "Please enter a value between 1 and 24 for no disturbance cards"); return; } Welcome.cardStack.nodistcards = num; } catch(NumberFormatException ex) { JOptionPane. showMessageDialog (this, "Please enter integer value for no disturbance cards"); return; } try { seed = Integer. parseInt (text5. getText ()) ; } catch (NumberFonnatException ex) { JOptionPane. showMessageDialog (this, "Please enter integer value for seed"); return; } /*if (e. getSource == button2) AppletContext context = getAppletContext () ; try { context. showDocument (new URL ("http ://invsee.asu.edu/bhavin/Game/index. html") ); } catch (Exception ex) { System. out. println ("Exception :"+ ex); } */ CardStack. seed = seed; Welcome. cardStack. init () ; this. setVisible (false); this.getTopLevelAncestor().setVisible(false); } public static void main(String argv[]) { JFrame frame = new JFrame("Welcome whatever"); 1153990

frame. getContentPane (). add (new Entry ()) ; frame. setSize (800, 600) ; frame. setVisible (true) ; } } //Welcome to the Floristic Relay : The Computer Game //We hope you enjoyed playing the board game. This computer game follows the same rules as //the board game. However, it will take a lot less time to play allowing you to experiment. //You should now select how many cards of each event type you would like to play with. GameApplet. j ava GameApplet j ava import javax. swing. JApplet ; public class GameApplet extends JApplet { public static Welcome welcome ; public void init () { welcome = new Welcome (this) ; getContentPane (). add (welcome) ; } } ImagePanel j ava import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; public class ImagePanel extends JPanel { private String name ; private Image image ; private String text ; ImagePanel (String text, Image image, String name) { this. image = image ; this. name = name ; this. text = text ; setToolTipText (text) ; setB ackground (Color. white) ;

//setDoubleBuffered (true) ; I /*public JToolTip createToolTip () { JToolTip toolTip ; toolTip = new JToolTip () ; toolTip. setOpaque (true) ; toolTip. setTipText (text) ; toolTip. setComponent (this) ; return toolTip ; } *I public void update (Graphics g) { paint (g) ; } public void paint (Graphics g) { super. paint (g) ; g. drawImage (image, 0, 0, this) ; g. drawString (name, 0, getHeight ()-10) ; } } InfoPanel. java InfoPanel java import javax. swing. * ; import java. awt. * ; public class InfoArea extends JPanel { String text ; public InfoArea (String text) { this. text = text ; setOpaque (true) ; } public void paint (Graphics g) { g. drawString (text, 0, 0) ; } }

Interaction. java import java. awt. * ; import java. awt. image. * ; public class Interaction { String title ; String text ; String textl ; int normalLate ; int normalEarly ; int tieBreakWin ; int tieBreakLose ; String event ; public Interaction (String title, String text, String textl, int normalLate, int normalEarly, int tieBreakWin, int tieBreakLose) { this. title = title ; this. text = text ; this. textl = textl ; this. normalLate = normalLate ; this. normalEarly = normalEarly ; this. tieBreakWin = tieBreakWin ; this. tieBreakLose = tieBreakLose ; } public void draw (Graphics g, int x, int y, ImageObserver observer) { g. setColor (Color. blue) ; g. drawString (title, x+10, 20) ; g. setColor (Color. red) ; g. drawString (text, x+10, 40) ; g. drawString (textl, x+10, 60) ; g. setColor (Color. black) ; String nLate ="Late"+ ( (normalLate > 0) ?"move forward"+ nonnalLate : ( (normalLate == 0) ?"stays in place" :"move back"+ (-normalLate))) ; g. drawString (nLate, x+10, 80) ; String nEarly ="Early"+ ( (normalEarly > 0) ?"move forward"+ normalEarly : ((normalEarly == 0) ?"stays in place" :"move back"+ (-normalEarly))) ; g. drawString (nEarly, x+10, 100) ;

InteractionWaiters. java import java. util. Vector ; public class InteractionWaiters { private static InteractionWaiters instance ; private Vector waiters ; private InteractionWaiters () { waiters = new Vector () ; I public static InteractionWaiters gethiteractionwaiterso { if (_instance == null) { instance = new InteractionWaiters () ; } return instance ; } public void addWaiter (Square square) { waiters. addElement (square) ; I public void removeWaiter (Square square) { waiters. removeElement (square) ; } public Vector getWaiters () { return waiters ; I public static void refresh () { instance = null ; } public void resetVector () { waiters. removeAllElements () ; } } Intstact. j ava

import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; import java. util. * ; import java. net. * ; public class IntStack extends JPanel implements MouseListener { Stack open, closed ; JApplet parent ; //Image wildfireh-nage ; String properties [] = {"Competition For Water : Late has more roots : & uses up all the water : 2 :-1 : 2 :-l","Competition For Light : Late character shades : Early character type : 2 :-1 : 2 :- 1","Facilitation With Nutrients : Early Character type adds : nitrogen to the soil : 2 : 0 : 2 : 0","Facilitation With Shade : Early protects late from : Heat & drying out : 2 : 0 : 2 : 0","Tolerance : Species : tolerate each other : 0 : 0 : 0 : 0","Tolerance : Species : tolerate each other : 0 : 0 : 0 : 0"} ; public hitStack (JApplet applet) { parent = applet ; open = new Stack () ; closed = new Stack () ; setBackground (Color. white) ; addMouseListener (this) ; } public void close () { while ( ! open. empty ()) { closed. push (open. pop ()) ; } repaint () ; } public void initO { for (int j=l ; j<200 ; j++) { for (int i=0 ; i<properties. length ; i++) { StringTokenizer tokens = new StringTokenizer (properties [i], ""\ '/ ? String title = tokens. nextToken () ; String text = tokens. nextToken () ; String textl = tokens. nextToken () ; int normalLate = Integer. parseInt (tokens. nextToken ()) ; int normalEarly = Integer. parseInt (tokens. nextToken ()) ; int tieWin = Integer. parseInt (tokens. nextToken ()) ; int tieLose = Integer. parseInt (tokens. nextToken ()) ;

Interaction interaction = new Interaction (title, text, textl, normalLate, normalEarly, tieWin, tieLose) ; closed. push (interaction) ; } } public void update (Graphics g) { paint (g) ; } public void paint (Graphics g) { super. paint (g) ; g. setColor (Color. green) ; g. drawRoundRect (0, 0, 150, 200, 20, 20) ; g. setColor (Color. green) ; g. drawRoundRect (155, 0, 150, 200, 20, 20) ; g. setColor (Color. red) ; g. drawString ("Current Interaction", 170, 215) ; g. setColor (Color. green) ; g. drawRoundRect (600, 400, 200, 250, 20, 20) ; if (closed. size () > 0) { Font font = new Font ("Times New Roman", Font. BOLD, 32) ; g. setColor (Color. red) ; g. drawString ("Click For Interaction", 25, 100) ; } if (open. size () > 0) { Interaction interaction = (Interaction) open. peek () ; interaction. draw (g, 155, 100, this) ; } } public void mouseClicked (MouseEvent e) { int x = e. get () ; int y = e. getY () ; if (x>0&&x<150&&y>0&&y<200) { Interaction interaction = null ; InteractionWaiters iWaiters = InteractionWaiters. getInteractionWaiters () ; Vector waiters = iWaiters. getWaiters () ; if ( ! (waiters. size () > 0 && ! (waiters. size () = 1 && (waiters. elementAt (0) == Welcome. beginSquare 11 waiters. elementAt (0) == Welcome. finishSquare)) && ! ((waiters. size () =2) && ( (waiters. elementAt (0) == Welcome. beginSquare && waiters. elementAt (l) = Welcome. finishSquare) 11 (waiters. elementAt (0) = Welcome. finishSquare && waiters. elementAt (l) == Welcome. beginSquare))))) {

JOptionPane. showMessageDialog (this,"No characters to Interact") ; return ; I if (closed. size () > 0) { interaction = (Interaction) closed. pop () ; open. push (interaction) ; ( ( (GameApplet) parent). welcome). adjustPieces (interaction. normalLate, interaction. normalEarly, interaction. tieBreakWin, interaction. tieBreakLose) ; repaint () ; } Welcome. resultPanel. dynamicUpdate (Welcome. characters) ; parent. repaint () ; if (Welcome. finishSquare. piecesVector. size () > 0) { removeMouseListener (this) ; Welcome. cardStack. removeMouseListener (Welcome. cardStack) ; String message = new String ("Game over. Winner (s) :") ; for (int i=O ; i<Welcome. finishSquare. piecesVector. size () ; i++) { message += ( (Character) Welcome. finishSquare. piecesVector. elementAt (i)). name +""; } JOptionPane. showMessageDialog (this, message) ; } } public void mousePressed (MouseEvent e) { } public void mouseEntered (MouseEvent e) { public void mouseExited (MouseEvent e) { } public void mouseReleased (MouseEvent e) { } } Login. java Logm. Java import javax. swing. * ; import java. awt. * ; import j ava. awt. event. * ;

public class Login extends JPanel implements ActionListener { JLabel userLabel, passwordLabel ; JTextField userField ; JPasswordField passwordField ; JButton olcButton ; Welcome parent ; public Login (Welcome parent) { setLayout (null) ; userLabel = new JLabel ("User name :") ; userLabel. setBounds (10, 10, 100, 25) ; userField = new JTextField () ; userField. setBounds (120, 10, 100, 25) ; add (userLabel) ; add (userField) ; passwordLabel = new JLabel ("Password :") ; passwordLabel. setBounds (10, 40, 100, 25) ; passwordField = new JPasswordField () ; passwordField. setBounds (120, 40, 100, 25) ; add (passwordLabel) ; add (passwordField) ; okButton = new JButton ("OK") ; okButton. setBounds (90, 100, 100, 25) ; okButton. addActionListener (this) ; add (okButton) ; this. parent = parent ; } public void actionPerformed (ActionEvent e) { String userName = new String () ; String password = new String () ; userName = userField. getText () ; password = new String (passwordField. getPassword ()) ; if (userName. compareTo ("bhavin") = 0) { if (password. compareTo ("shyamal") == 0) { this. getTopLevelAncestor (). setVisible (false) ; parent. initialize () ; return ; } else { JOptionPane. showMessageDialog (this,"Wrong password ! Enter again.") ; } } else {

JOptionPane. showMessageDialog (this,"The Username does not exist ! Enter again.") ; } } } ResultPanel j ava import javax. swing. * ; import java. awt. * ; public class ResultPanel extends JPanel { Character rankings [] ; int finished ; String ranks [] = {"1 st Place","2nd Place","3rd Place","4th Place","5th Place","6th Place"} ; String events [] = {"Fire","Landslide","Grazing","No Disturbance"} ; int intRanks [] ; public ResultPanel () { rankings = new Character [6] ; finished = 0 ; intRanks = new int [6] ; setBackground (Color. white) ; } public void addFinished (Character c) { rankings [finished++] = c ; } public void dynamicUpdate (Character characters) { //Insertion sort to put ranks of characters into the rankings array. for (int i=O ; i<characters. length ; i++) { int j ; for (j=i ; j>0 ; j--) { if (rankings [1-1]. currentIndex < characters [i]. currentIndex) rankingsrj] = rankingsEj-l] ; else break ; } rankings [j] = characters [i] ; } repaint () ; } public void paint (Graphics g)

{ int numPlants = 0 ; super. paint (g) ; g. drawRoundRect (l 0, 10, 500, 250, 20, 20) ; int rank =-1 ; int index = 26 ; for (int i=0 ; i<rankings. length ; i++) { System. out. println (i+"place"+rankings [i]. name) ; if (rankings [i]. currentlndex =-l) { intRanks [i] = 5 ; continue ; } if (rankings [i]. currentlndex < index) { index = rankings [i]. currentIndex ; rank++ ; } intRanks [i] = rank ; } /*g. setColor (Color. green) ; g. drawRoundRect (520, 10, 290, 150, 20, 20) ; g. setColor (Color. red) ; g. drawImage (Welcome. pieces [0], 530, 60, this) ; g. drawString ("Borogrove", 368, 120) ; g. drawImage (Welcome. pieces [4], 460, 70, this) ; g. drawString ("Truffula", 455, 120) ; g. drawImage (Welcome. pieces [2], 560, 70, this) ; g. drawString ("Lorax", 550, 120) ; g. drawImage (Welcome. pieces [3], 370, 150, this) ; g. drawString ("Momerath", 368, 180) ; g. drawImage (Welcome. pieces [l], 450, 150, this) ; g. drawString ("Glickle", 440, 190) ; g. drawImage (Welcome. pieces [5], 550, 140, this) ; g. drawString ("Mimsy", 510, 180) ; */ for (int i=0 ; i<6 ; i++) { switch (intRanks [i]) { case 0 : numPlants += 6 ; break ; case 1 : numPlants += 5 ; break ; case 2 : numPlants += 4 ; break ; case 3 : numPlants += 3 ; break ; case 4 : numPlants += 2 ; break ;

case 5 : numPlants += (rankings [i]. currentIndex =-1) ? 0 :. 1 ; } } int start = 20 ; int starty = 250 ; int temp [] = new int [6] ; int printTemp [] = new int [6] ; Hg. drawRoundRect (10, 40, 500, 200, 25, 25) ; for (int i=0 ; i<6 ; i++) { if (intRanks [i] == 5 && rankings [i]. currentlndex =--1) printTemp [i] = temp [i] = 0 ; else printTemp [i] = temp [i] = 6-intRanks [i] ; } System. out. println ("numPlants"+numPlants) ; for (int i=0, j=0, k=l ; i<numPlants ; i++, j= (j+1) % 6) { if (temp [j] > 0) { int y = rankingsEj]. pieceImage. getHeigl1t (this) ; g. drawImage (ranlcingsb]. pieceImage, start, starty-y, this) ; start += ranlcings [j]. pieceImage. getWidth (this) ; temp [j]--; } else { i-- ; } if (i > k * numPlants/3) { starty-= 70 ; start = 20 ; lu++ ; } } g. setColor (Color. blue) ; g. drawString ("Rank", 10, 310) ; g. setColor (Color. black) ; g. drawString (" ", 10, 310) ; g. setColor (Color. blue) ; g. drawString ("Plant Name", 100, 310) ; g. drawString ("No. Plants", 250, 310) ; g. drawString ("No. Cards Used", 350, 310) ; g. drawString ("No Disturbance", 350, 340) ; g. drawString ("Fire", 350, 370) ; g. drawString ("Grazing", 350, 400) ; g. drawString ("Landslide", 350, 430) ; g. drawString (String. valueOf (Welcome. cardStack. cardNumbers [0]), 480, 340) ; g. drawString (String. valueOf (Welcome. cardStack. cardNumbers [l]), 480, 370 ) ;

g. drawString (String. valueOf (Welcome. cardStack. cardNumbers [2]), 480, 400 ) ; g. drawString (String. valueOf (Welcome. cardStack. cardNumbers [3]), 480, 430 ) ; g. drawString ("Initial Selection No. Cards", 530, 310) ; //g. drawString ("No. Cards Used", 525, 310) ; g. drawString ("No Disturbance", 550, 340) ; g. drawString ("Fire", 550, 370) ; g. drawString ("Grazing", 550, 400) ; g. drawString ("Landslide", 550, 430) ; g. drawString (String. valueOf (Welcome. cardStack. numCards [9]), 650, 340) ; g. drawString (String. valueOf (Welcome. cardStack. numCards [8]), 650, 370) ; g. drawString (String. valueOf (Welcome. cardStack. numgrazing), 650, 400) ; g. drawString (String. valueOf (Welcome. cardStack. nodistcards), 650, 430) ; for (int i=0 ; i<ranlcings. length ; i++) { g. setColor (Color. blue) ; g. setFont (new Font ("Times New Roman", Font. PLAIN, 16)) ; g. drawString (ranks [intRanks [i]], 10, 350 + i * 35) ; g. drawString (rankings [i]. name, 100, 350 + i * 35) ; g. drawString (String. valueOf (printTemp [i]), 250, 350 + i * 35) ; g. drawImage (rankings [i]. piecelmage, 300, 350 + i * 35-20, 20, 20, this) ; } } Square. java import java. awt. * ; import java. awt. event. * ; import javax. swing. * ; import java. util. * ; public class Square { int xCoord, yCoord, curve, size ; Vector pieces Vector ; Vector interactors ; Vector interactingPairs ; int movement = 0 ; Random rand ; public Square (int xCoord, int yCoord, int size, int curve, int movement) { this. xCoord = xCoord ;

this. yCoord = yCoord ; this. curve = curve ; this. size = size ; this. movement = movement ; piecesVector = new Vector () ; interactors = new Vector () ; interactingPairs = new Vector () ; rand = new Random (CardStack. seed) ; } public void clearSquare () { movement = 0 ; interactors = new Vector () ; interactingPairs = new Vector () ; pieces Vector = new Vector () ; } public void formPairs () { if (interactors. size () > 0) { System. out. println ("interactors size"+interactors. size ()) ; for (int i=O ; i<interactors. size ()-l ; i++) { for (intj=i+l ; j<interactors. size () ; j++) { Character chars [] = new Character [2] ; chars [0] = (Character) interactors. elementAt (i) ; chars [1] = (Character) interactors. elementAt (j) ; System. out. println ("adding pair"+chars [0]. name+" "+chars [1]. name) ; interactingP airs. addElement (chars) ; } } } } public int putPiece (Character piece) { /* try { Thread. sleep (200) ; } catch (InterruptedException e) {} */ if (piece ! = null) { if (movement = 0) { piecesVector. addElement (piece) ; if (piecesVector. size () > 1) { if (piecesVector. size () = 2) { interactors = new Vector () ; interactors. addElement (piecesVector. elementAt (0)) ;

InteractionWaiters iWaiters = InteractionWaiters. getlnteractionWaiters () ; iWaiters. addWaiter (this); } interactors. addElement (piece); } return 0; } return movement; } return 0 ; } public void removePiece (Character piece) { if (piecesVector. size () = 2) { InteractionWaiters iWaiters = InteractionWaiters. getInteractionWaiters() ; iWaiters. removeWaiter (this) ; } piecesVector. remove (piece); <BR> <BR> interactors.remove(piece);<BR> <BR> <BR> <BR> <BR> <BR> <BR> } public void removePairsWith(Character ch) { Vector new Vector = new Vector () ; for (int i=0 ; i<interactingPairs. size () ; i++) { Character chars [] = (Character [] ) interactingPairs. elementAt (i); if (chars [0] ! = ch && chars [l] ! = ch) { newVector. addElement (chars); <BR> <BR> }<BR> } <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> interactingPairs = newVector ;<BR> <BR> <BR> <BR> <BR> } public void interact (int normalLate, int normalEarly, int tieBreakWinner, int tieBreakLoser) { Character chars []; chars = (Character [] ) interactingPairs. elementAt (0) ; interactingPairs. removeElementAt (0) ; if (interactingPairs. size () == 0) { interactors. removeAllElements () ; Vector waiters = InteractionWaiters. getInteractionWaiters (). getWaiters () ; waiters. removeElement (this); } if (normalEarly = normalLate) { return; 1153990

I if (chars [0]. type == chars [l]. type) { System. out. println ("Coin flip") ; int winner = (rand. nextBoolean () == true) ? 0 : 1 ; int loser = (winner == 0) ? 1 : 0 ; if (tieBreakWinner ! = 0) { interactors. remove (chars [winner]) ; removePairsWith (chars [winner]) ; chars [winner]. move (tieBreakWinner) ; } if (tieBreakLoser ! = 0) { interactors. remove (chars [loser]) ; removePairsWith (chars [loser]) ; chars [loser]. move (tieBreakLoser) ; } } else { System. out. println ("No Coin flip") ; int late = (chars [0]. type. compareTo ("Late Successional") == 0) ? 0 : 1 ; int early = (late = 0) ? 1 : 0 ; System. out. println ("early"+chars [early]. name+"normalEarly "+normalEarly) ; System. out. println ("late"+chars [late]. name+"normalLate "+normalLate) ; if (nolmalLate ! = 0) { interactors. remove (chars [late]) ; removePairsWith (chars [late]) ; chars [late]. move (normalLate) ; } if (normalEarly ! = 0) { interactors. remove (chars [early]) ; removePairsWith (chars [early]) ; chars [early]. move (normalEarly) ; } } public Vector getCharacters () f return pieces Vector ; } public void paint (Graphics g, Component observer) { g. drawRoundRect (xCoord, yCoord, size, size, curve, curve) ; for (int i=0 ; i<piecesVector. size () ; i++) { Character piece = (Character) piecesVector. elementAt (i) ; int x = xCoord + (i % 3) * 20 + 2 ; int y = yCoord + (i/3 * 20) + 2 ; if (i>2) {

y=y+20 ; } g. drawImage (piece. pieceImage, x, y, 23, 23, observer) ; } } } Welcome. Java Welcomejava import javax. swing. * ; import java. awt. * ; import java. awt. event. * ; import java. util. * ; import java. net. URL ; import java. awt. image. * ; import java. applet. * ; import java. net. * ; public class Welcome extends JPanel implements ActionListener, MouseMotionListener { public static IntStack intStack ; public static CardStack cardStack ; public static Square beginSquare ; public static Square finishSquare ; public static Vector squaresVector ; public static Character characters new Character [6] ; JLabel label ; JButton resultButton, restartButton, exitButton ; JFrame resultFrame ; public static ResultPanel resultPanel ; boolean initialized = false ; public static Image pieces [] ; String piecesString [] = {"borogrovejpg","gricklejpg","loraxjpg","momerathjpg", "truffula. jpg","mimsy. jpg"} ; String names [] = {"Borogrove Grass","Grickle Grass","Lorax Tree","Momerath Herb","Tniffula tree","Mimsy Bush"} ; String types [] = {"Late Successional","Early Successional","Early Successional", "Early Successional","Late Successional","Late Successional"} ; String tooltips [] = {"<html>Borogrove Grass<br>Character Type : <br>Late Successional<br><br>Fire Event : <br>go back 1 place<br><br>Landslide event : <br>go back 1 place<br><br>Grazing event : <br>go back 3 place<br><br>No disturbance<br>go forward 3 places<br></body><html>", "<html>Grickle Grass<br>Character Type : <br>Early Successional<br><br>Fire Event : <br>go back 2 place<br><br>Landslide event : <br>stay in place<br><br>Grazing event : <br>go forward 5 places<br><br>No disturbance<br>go back 1 place<br><html>",

"<html>Lorax Tree<br>Character Type: <br>Early Successional<br><br>Fire Event: <br>stay in the same place<br><br>Landslide event: <br>go forward 5 places<br><br>Grazing event: <br>go forward 2 place<br><br>No disturbance<br>go back 1 place<br><html>", "<html>Momerath Herb<br>Character Type: <br>Early Successional<br><br>Fire Event: <br>go forward 5 places<br><br>Landslide event: <br>go forward 2 places<br><br>Grazing event: <br>stay in the same place<br><br>No disturbance<br>go back 1 place<br><html>", "<html>Truffula tree<br>Character Type: <br>Late Successional<br><br>Fire Event: <br>go back 4 places<br><br>Landslide event: <br>go back 1 place<br><br>Grazing event: <br>stay in the same place<br><br>No disturbance<br>go forward 3 places<br><html>", "<html>Mimsy Bush<br>Character Type : <br>Late Successional<br><br>Fire Event: <br>go back 1 place<br><br>Landslide event: <br>go back 4 place<br><br>Grazing event: <br>stay in the same place<br><br>No disturbance<br>go forward 3 places<br><html>"} ; ImagePanel panels []; JApplet parent; ilit reactions 1,-1,-3, 3}, {2,0, 5, -1}, {0, 5, 2,-1}, {5, 2, 0,-1}, {-4,-1, 0, 3}, {-1,-4, 0, 3}} ; Random random; public void stop () <BR> <BR> <BR> <BR> <BR> <BR> {<BR> <BR> <BR> <BR> <BR> <BR> } public Welcome(JApplet parent) { this. parent = parent; <BR> <BR> initialize();<BR> <BR> <BR> <BR> <BR> <BR> } public void restart() { cardStack. close () ; intStack. close () ; for (int i=O ; i<squaresVector. size () ; i++) { Square square = (Square) squaresVector. elementAt (i); square. clearSquare () ; } beginSquare. clearSquare () ; finishSquare. clearSquare () ; for (int i=0 ; i<6 i++) { beginSquare. putPiece (characters [i] ) ; 11 38 JO

I InteractionWaiters. refresh () ; for (int i=0 ; i<6 ; i++) { characters [i]. currentIndex =-1 ; } } public void initialize () { System. out. println ("Init called in refresh ? ?") ; random = new Random () ; //Container contentPane = getContentPane () ; /*contentPane. */setLayout (null) ; cardStack = new CardStack (parent) ; //cardStack. init () ; cardStack. setBounds (10, 50, 350, 240) ; cardStack. setBackground (Color. white) ; /*contentPane. */add (cardStack) ; intStack = new IntStack (parent) ; intStack. init () ; intStack. setBounds (650, 300, 450, 250) ; intStack. setBackground (Color. white) ; /*contentPane. */add (intStack) ; MediaTracker tracker = new MediaTracker (this) ; pieces = new Image [6] ; for (int i=0 ; i<6 ; i++) { try { pieces [i] = parent. getImage (new URL (parent. getCodeBase (), "New Images/"+piecesString [i])) ; tracker. addImage (pieces [i], 0) ; try { tracker. waitForID (0) ; } catch (InterruptedException e) { } } catch (Exception e) { System. out. println ("Bad URL, Image not loaded") ; } } /*contentPane. */setBackground (Color. white) ; beginSquare = new Square (20, 350, 80, 20, 0) ; finishSquare = new Square (690, 90, 80, 20, 0) ; squaresVector = new Vector () ; squaresVector. addElement (new Square (100, 350, 60, 20, 0)) ;

squaresVector. addElement (new Square (160, 350, 60, 20, 0)) ; squaresVector. addElement (new Square (160, 410, 60, 20, 0)) ; squaresVector. addElement (new Square (160, 470, 60, 20, 2)) ; squaresVector. addElement (new Square (220, 470, 60, 20, 0)) ; squaresVector. addElement (new Square (280, 470, 60, 20, 0)) ; squaresVector. addElement (new Square (340, 470, 60, 20, 0)) ; squaresVector. addElement (new Square (340, 410, 60, 20,-1)) ; squaresVector. addElement (new Square (340, 350, 60, 20, 0)) ; squaresVector. addElement (new Square (340, 290, 60, 20, 0)) ; squaresVector. addElement (new Square (400, 290, 60, 20, 0)) ; squaresVector. addElement (new Square (460, 290, 60, 20, 0)) ; squaresVector. addElement (new Square (460, 350, 60, 20,-1)) ; squaresVector. addElement (new Square (460, 410, 60, 20, 0)) ; squaresVector. addElement (new Square (460, 470, 60, 20, 0)) ; squaresVector. addElement (new Square (520, 470, 60, 20,-1)) ; squaresVector. addElement (new Square (580, 470, 60, 20, 0)) ; squaresVector. addElement (new Square (580, 410, 60, 20, 0)) ; squaresVector. addElement (new Square (580, 350, 60, 20, 0)) ; squaresVector. addElement (new Square (580, 290, 60, 20, 2)) ; squaresVector. addElement (new Square (580, 230, 60, 20, 0)) ; squaresVector. addElement (new Square (640, 230, 60, 20, 0)) ; squaresVector. addElement (new Square (700, 230, 60, 20,-l)) ; squaresVector. addElement (new Square (700, 170, 60, 20, 0)) ; resultButton = new JButton ("Show Results") ; resultButton. setBounds (780, 100, 150, 25) ; resultButton. setBackground (new Color (120, 120, 240)) ; resultButton. addActionListener (this) ; /*getContentPane (). */add (resultButton) ; restartButton = new JButton ("Start Again") ;

restartButton. setBounds (350, 550, 100, 25) ; restartButton. setBackground (new Color (120, 120, 240)) ; restartButton. addActionListener (this) ; /*getContentPane (). */add (restartButton) ; exitButton = new JButton ("Exit") ; exitButton. setBounds (475, 550, 75, 25) ; exitButton. setBackground (new Color (120, 120, 240)) ; exitButton. addActionListener (this) ; /* getcontel1tP ane (). */add (exitButton) ; panels = new ImagePanel [6] ; for (int i=0 ; i<6 ; i++) { characters [i] = new Character (names [i], pieces [i], types [i], reactions [i]) ; panels [i] = new IinagePanel (tooltips [i], pieces [i], names [i]) ; ) panels [0]. setBounds (370, 70, 100, 65) ; /*getContentPane (). */add (panels [0]) ; panels [l]. setBounds (480, 70, 90, 65) ; /*getContentPane (). */add (panels [l]) ; panels [2]. setBounds (580, 70, 125, 65) ; /*getContentPane (). */add (panels [2]) ; panels [3]. setBounds (370, 150, 80, 65) ; /*getContentPane (). */add (panels [3]) ; panels [4]. setBounds (470, 150, 100, 65) ; /*getContentPane (). */add (panels [4]) ; panels [5]. setBounds (570, 150, 125, 65) ; /*getContentPane (). */add (panels [5]) ; for (int i=0 ; i<6 ; i++) { beginSquare. putPiece (characters [i]) ; I resultFrame = new JFrame0 ; resultFrame. getContentPane (). add (resultPanel = new ResultPanel ()) ; resultFrame. setSize (700, 700) ; JFrame frame = new JFrame ("Welcome !") ; frame. getContentPane (). add (new Entry ()) ; frame. setSize (800, 600) ; frame. setVisible (true) ; initialized = true ; } public void putPiece (Character piece, int i) { if (i < squares Vector. size ()) { Square square = (Square) squaresVector. elementAt (i) ; square. putPiece (piece) ; repaint () ;

public void adjustPieces (int normalLate, int normalEarly, int tieBreakWinner, int <BR> <BR> tieBreakLoser)<BR> <BR> <BR> <BR> <BR> { InteractionWaiters iWaiters = InteractionWaiters.getInteractionWaiters(); Vector waiters = iWaiters. getWaiters () ; Square interactingSquare = null; for (int i=0 ; i<waiters. size () ; i++) { interactingSquare = (Square) waiters. elementAt (i); if (interactingSquare ! = beginSquare && interactingSquare ! = finishSquare) break ; <BR> <BR> interactingSquare = null;<BR> <BR> <BR> <BR> <BR> } if(interactingSquare != null); interactingSquare. interact (normalLate, normalEarly, tieBreakWinner, tieBreakLoser) ; } BufferedImage newImage = null; public void update (Graphics g) <BR> <BR> {<BR> <BR> <BR> paint(g);<BR> <BR> <BR> <BR> <BR> } public void paint(Graphics g) { super. paint (g); if ( ! initialized) return; g. setColor (Color. red); //g. drawString ("<html>YouMake<br>seeds+2<br><html> ", 163,490) ; g. drawString ("seeds +2", 163,505) ; g. drawString ("You Catch", 345, 430) ; g. drawString ("a disease", 345,440) ; g. drawString ("-1", 345,450) ; g. drawString ("You Catch", 464,370) ; g. drawString ("a disease", 464,380) ; g. drawString ("-1", 464,390) ; g. drawString ("You are", 527,485) ; g. drawString ("attacked", 522,500) ; g. drawString ("by insects", 523, 512) ; g. drawString ("-1", 523,522) ; g. drawString ("You Make", 582, 310) ; g. drawString ("seeds +2", 582,320) ; g. drawString (" You are", 700,245) ; 1153990

g. drawString (" attacked", 700, 258) ; g. drawString ("by insects", 700, 268) ; g. drawString ("-1", 700, 278) ; g. setColor (Color. green) ; g. drawRoundRect (360, 50, 290, 170, 20, 20) ; g. setColor (Color. red) ; { g. setFont (new Font ("Tahoma", Font. ITALIC, 20)) ; g. drawString ("Plant Succession Game !", 400, 25) ; } g. setColor (Color. blue) ; { g. setFont (new Font ("Tahoma", Font. PLAIN, 18)) ; g. drawString ("BEGIN PLAYING HERE", 20, 30) ; g. drawString ("Time------------------>", 15, 330) ; g. drawString ("Intial Positions", 15, 470) ; 1 g. setColor (Color. blue) ; beginSquare. paint (g, this) ; finishSquare. paint (g, this) ; g. setColor (Color. black) ; for (int i=O ; i<squaresVector. size () ; i++) f Square square = (Square) squaresVector. elementAt (i) ; square. paint (g, this) ; } g. setColor (Color. blue) ; g. drawString ("Finish", 695, 70) ; } public void actionPerformed (ActionEvent e) ( if (e. getSource () =resultButton) { resultFrame. setVisible (true) ; } else if (e. getSource () == exitButton) { AppletContext context = parent. getAppletContext () ; try { context. showDocument (new URL ("http ://invsee. asu. edu/bhavin/Floristic/index. html")) ; } catch (Exception ex) { System. out. println ("Exception :" + ex) ; } } else if (e. getSource () == restartButton) { restart () ;

repaint () ; } } public void mouseMoved (MouseEvent e) { I public void mouseDragged (MouseEvent e) { } class SeedEntry extends JFrame implements ActionListener { JTextField entry ; public SeedEntry () { JLabel label = new JLabel ("Please enter a Number between 0 and 10000") ; entry = new JTextField () ; JButton okButton = new JButton ("OK") ; olcButton. addActionListener (this) ; getContentPane (). add (label, BorderLayout. NORTH) ; getContentPane (). add (entry) ; getContentPane (). add (ol (Button, BorderLayout. SOUTH) ; public void actionPerformed (ActionEvent e) { int seed ; try { seed = Integer. parseInt (entry. getText ()) ; } catch (NumberFormatException ex) { return ; } CardStack. seed = seed ; cardStack. shuffle () ; this. setVisible (false) ; } } The foregoing descriptions of at least one preferred embodiment are exemplary and not intended to limit the claimed invention. Obvious modifications that do not depart from the spirit and scope of the invention as claimed will be apparent to those skilled in the art.