Class Item

java.lang.Object
  extended by greenfoot.Actor
      extended by Item

public class Item
extends greenfoot.Actor

Write a description of class Item here.

Version:
(a version number or a date)
Author:
(your name)

Constructor Summary
Item(java.lang.String name)
          Creates a different image depending on parameter name.
 
Method Summary
 void act()
          Act - do whatever the Item wants to do.
 char getType()
          Exposes the private member type.
 
Methods inherited from class greenfoot.Actor
addedToWorld, getHeight, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWidth, getWorld, getX, getY, intersects, setImage, setImage, setLocation, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Item

public Item(java.lang.String name)
Creates a different image depending on parameter name. Also sets type where necessary (for Rock, Paper, or Scissor).

Parameters:
name - The general title of the image desired. This parameter is compared by equalsIgnoreCase.
Method Detail

act

public void act()
Act - do whatever the Item wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.

Overrides:
act in class greenfoot.Actor

getType

public char getType()
Exposes the private member type.

Returns:
char - This Item's private char type.