/** A class of snakes that can be told how to turn.
 *
 *  These are used for the human player in the game of Slither.
 *  @author Jim Grundy
 *  @version $Revision: 1.8 $ */

import java.awt.Color;	// Colors

public class PlayerSnake extends Snake
{
    private static final Color PLAYER_COLOR = Color.green;
    private static final char PLAYER_LETTER = 'P';

    /** Create (and draw) a controllable snake on a field of grass.
     *
     *  The initial position of the snake is supplied, as are the colors
     *  for its head and body. The snake should be of length 1, i.e.,
     *  just the head, and the snake should be heading straight up the
     *  field.
     *  
     *  PRE: The square selected should be empty, i.e., 
     *       field.getContent(col,row) == GrassField.CT_GRASS */
    public PlayerSnake(ObjectField field, int x, int y)
    {
	super(field, x, y, PLAYER_COLOR, PLAYER_LETTER);
    }
    
    /** Turn 90 degrees to the right.
     *
     *  Note: Several requests to turn can be made to a snake between
     *  moves, but only the most recent request has any effect. */
    public void turnRight()
    {
	super.turnRight();
    }
    
    /** Turn 90 degrees to the left.
     *
     *  Note: Several requests to turn can be made to a snake between
     *  moves, but only the most recent request has any effect. */
    public void turnLeft()
    {
	super.turnLeft();
    }
}

