Class City

java.lang.Object
  extended by greenfoot.World
      extended by City

public class City
extends greenfoot.World

Class City represents the world from which Snail is trying to escape. Players must type the letter they see on top of the screen. The more they type correctly the faster Snail moves.

Version:
24.04.2015
Author:
Maria - Despoina Gkaintatzi

Constructor Summary
City(Snail snail)
          Constructor for objects of class City.
 
Method Summary
 void act()
          Act method for class City.
 void gameOver(java.lang.String message)
          This method is called when the game is over to display the final score.
 Counter getLifeCounter()
          Returns the lifeCounter.
 Counter getScoreCounter()
          Returns the scoreCounter.
 void scrollBackground()
          Makes background scroll
 
Methods inherited from class greenfoot.World
addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

City

public City(Snail snail)
Constructor for objects of class City.

Method Detail

act

public void act()
Act method for class City.

Overrides:
act in class greenfoot.World

gameOver

public void gameOver(java.lang.String message)
This method is called when the game is over to display the final score.

Parameters:
message(String) - the message to be displayed when the game is over.

getLifeCounter

public Counter getLifeCounter()
Returns the lifeCounter.

Returns:
Counter lifeCounter

getScoreCounter

public Counter getScoreCounter()
Returns the scoreCounter.

Returns:
Counter scoreCounter

scrollBackground

public void scrollBackground()
Makes background scroll