Skip to content

Instantly share code, notes, and snippets.

@George3
George3 / TeleporterActor.java
Last active November 15, 2018 03:33
Yahoo! Answers homework help for question: "Desperate java gridworld issues, help!!!?"
import info.gridworld.actor.Actor;
import info.gridworld.actor.ActorWorld;
import info.gridworld.grid.Grid;
import info.gridworld.grid.Location;
import java.awt.Color;
/**
* Yahoo! Answers homework help for question: "Desperate java gridworld issues, help!!!?"
* http://answers.yahoo.com/question/index?qid=20131010175243AAMJlkA
@George3
George3 / LinearStringSearch.java
Created August 20, 2012 05:17
Yahoo! Answers: Code for qid=20120819133145AAdBf2E
/**
* From Yahoo! Answers: "Writing a Java linear search algorithm that
* uses generics and has an array that store any data..."
* http://answers.yahoo.com/question/index?qid=20120819133145AAdBf2E
*/
public class LinearStringSearch {
public static <AnyType extends Comparable<? super AnyType>> int LinearSearch(
AnyType target, AnyType[] sa) {
for (int i = 0; i < sa.length; ++i) {