/* $Id$
 *
 * Copyright (c) 1999 Xenonsoft Limited. All Rights Reserved.
 *
 * This software is protected by copyright. You are hereby notified from
 * now by reading this message. This software is also the confidential 
 * and proprietary information of Xenonsoft Limited.  ("Confidential
 * Information"). 
 *
 * This software is distributed under the Xenonsoft Public end user 
 * License ("XPeL"), where the machine-readable source code is provided 
 * under the "Open Source" model.
 * For more information, please read the file "LICENSE-XPL.txt" 
 */

// File:`Lander.java'
//
//
// DESCRIPTION
//	Lander World Object
// 
// Author
//
//	Peter Pilgrim
//	Tue May 18 23:09:23 BST 1999
// 
// RCS HEADER ``Lander.java''
// 
//	$Author$
//	$Date$
//	$Source$
//	$Revision$    $State$    $Locker$
//

package xenon.humanoid;

import java.awt.*;				// for Graphics
import java.awt.event.*;			// for ActionEvent

import xenon.gamekit.*;				// for GameEngine



public class GameUtilities 
{

    /** this controls the responsiveness of the lander/mutant 
     * Gee man, it certainly beats this boring code:
     * <code>if ( gameEngine.frameClock % N == 0 ) updateSprite()</code>
     */
    public final static int		RESPCOL=8;
    public final static int		RESPROW=7;

    protected final static boolean response_matrix[][] =
    {
	// 11111111
	// 01111111
	// 01110111
	// 01110101
	// 01010101
	// 01001001
	// 01000100

	// Fastest Lander
	{ true,  true,  true,  true,   true,  true,  true,  true, },	
	{ false, true,  true,  true,   true,  true,  true,  true, },	
	{ false, true,  true,  true,   false, true,  true,  true, },	
	{ false, true,  true,  true,   false, true,  false, true, },	
	{ false, true,  false, true,   false, true,  false, true, },	
	{ false, true,  false, false,  true,  false, false, true, },	
	// Slowest Lander
	{ false, true,  false, false,  true,  false, false, false },	
    };

    public static boolean isResponsive( int response, GameEngine engine )
    {
	int col = engine.getFrameClock() % GameUtilities.RESPCOL;
	return GameUtilities.response_matrix[ response][ col ];
    }
    
}

// fini
