newspaperRetrieval

newspaperRetrieval - Wall g = new Wall(Azeroth, 1, 2,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 import becker.robots.* /**Homework for CSCE 145 SECT 003 Homework 1.13 * @author Rocky * */ public class newspaperRetrieval { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //creating the city for the robot to move in City Azeroth = new City() Thing newspaper = new Thing(Azeroth, 2, 2) //adding walls Wall a = new Wall(Azeroth, 1, 1, Direction.WEST) Wall b = new Wall(Azeroth, 2, 1, Direction.WEST) Wall c = new Wall(Azeroth, 2, 1, Direction.SOUTH) Wall d = new Wall(Azeroth, 1, 1, Direction.NORTH) Wall e = new Wall(Azeroth, 1, 2, Direction.NORTH) Wall f = new Wall(Azeroth, 1, 2, Direction.EAST)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Wall g = new Wall(Azeroth, 1, 2, Direction.SOUTH) //creating robot Robot arthas = new Robot(Azeroth, 1, 2, Direction.SOUTH) //retrieving the paper arthas.turnLeft() arthas.turnLeft() arthas.turnLeft() arthas.move() arthas.turnLeft() arthas.move() arthas.turnLeft() arthas.move() arthas.pickThing() //returning to bed arthas.turnLeft() arthas.turnLeft() arthas.move() arthas.turnLeft() arthas.turnLeft() arthas.turnLeft() arthas.move() arthas.turnLeft() arthas.turnLeft() arthas.turnLeft() arthas.move() arthas.turnLeft() arthas.turnLeft() arthas.turnLeft() a } Sheet1 Page 2 }...
View Full Document

This note was uploaded on 04/08/2008 for the course CSCE 145 taught by Professor Huhns during the Fall '08 term at South Carolina.

Page1 / 2

newspaperRetrieval - Wall g = new Wall(Azeroth, 1, 2,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online