//***********************************************************
//*
//* File:           DumbPlayer.java
//* Author:         Abhinav Kamra
//* Contact:        kamra-at-cs.columbia.edu
//* Update:         10/03/2004
//*
//* Description:    Dump player for Project 2.  Purely for
//*                 didactic purposes.
//*
//***********************************************************

package Maps.g0;

import Maps.*;
import ui.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.image.*;
import javax.imageio.*;

public final class DumbPlayer implements IFCPlayer {

    static Random _random;
    static final String _CNAME = "Dumb Player";
    static final Color  _CCOLOR = new Color(0.8f, 0.2f, 0.4f);

    Maps _maps;
    ArrayList cities, links;

    public void register(Maps __maps) throws Exception {
	    _maps = __maps;
	    cities = _maps.Cities();
	    links = _maps.Links();
	    City c = (City) cities.get(1);
	    Link l = (Link) links.get(1);
	    c.x = 1;
	    l.linkname = "Haha";
    }

    public Move move() throws Exception {
	    BufferedImage[] images;

	    File file = new File("NY.jpg");

	    images = new BufferedImage[1];
	    images[0] = new BufferedImage(640, 480, 1);
	    images[0] = ImageIO.read(file);
	    
	    Move RET = new Move(images, "NY Map");
	    return RET;
    }

    public String name() throws Exception {
        return _CNAME;
    }

    public Color color() throws Exception {
        return _CCOLOR;
    }

    public boolean interactive() throws Exception {
        return false;
    }        

}
