User talk:Person Man

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

import bot.*; import java.util.*;


public class com2 extends jake { Dispenser d = new Dispenser(); public void runc() { left(); key(); Pez p = new Pez( 2); d.push( p); while(feelWall()) { right(); key(); Pez q = new Pez( 3); d.push( q); } step(); key(); Pez s = new Pez( 1); d.push( s); } public void leave() { turn(); Pez a = d.pop(); while( !d.isEmpty()) { if( a.info == 1) { step(); } else if( a.info == 2) { right(); } else { left(); } } }

public void opt() { Pez a = d.pop(); Pez b = d.pop(); Pez c = d.pop(); Pez e = d.pop(); if(a.info == 2 && b.info == 3) { a = c; b = e; c = d.pop(); e = d.pop(); } if(a.info == 3 && b.info == 2) { a = c; b = e; c = d.pop(); e = d.pop(); } if(a.info == 1 && b.info == 3 && c.info == 3 && e.info == 1) { a = b; b = c; c = d.pop(); e = d.pop(); } d.push(a); d.push(b); d.push(c); d.push(e); } public void compute() { key(); while(done == false) { runc(); } opt(); leave();

} }