/***********************************************************************
 * 
 *  G F O ! 
 *  by Chee Chew
 *      and 
 *     Ken Duda 
 *
 *  (c) 1990
 *
 *  This software is free for distribution.  This notice, however, may 
 *  not be altered.
 *  
 *  Enjoy! (and punt... )
 *
 ***********************************************************************/

#include "gfo.h"

struct level_params {
  int length;
  int width;
  int depth;
  int usecs;
  int faces_required;
  unsigned int valid_blocks;
} params[] = {
  {  4,  4, 10, 1000000, 8,  1 | 2 | 16 } ,
  {  6,  6, 12,  900000, 8, 1 | 2 | 4 | 8},
  {  6,  6, 10,  900000, 8, 1 | 2 | 4 | 8 | 16 | 32},
  {  4,  8, 10,  900000, 8, 1 | 2 | 4 | 8 | 16 | 32},
  {  8,  8,  5, 1500000, 8, 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128},
  {  6,  6,  7,  800000, 8,
       (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) 
	 | (1 << 6) | (1 << 7) | (1 << 8) | (1 << 9) | (1 << 10)},
  {  6,  6, 12,  800000, 8,
       (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) 
	 | (1 << 6) | (1 << 7) | (1 << 8) | (1 << 9) | (1 << 10)}
 };
  

#define NUM_PARAMS (sizeof(params)/sizeof(struct level_params))

configure_well (Game *g)
{
  struct level_params *p;
  Well *w;
  int n;

  w = g->well;
  n = (g->round < NUM_PARAMS ? g->round : NUM_PARAMS);
  p = params + n - 1;
  w->length = p->length;
  w->width = p->width;
  w->depth = p->depth;
  w->valid_blocks = p->valid_blocks;
  g->usecs = p->usecs;
  g->faces_required = p->faces_required;
/*  printf ("Starting level %d,%d,%d,%d,%d\n",
	  p->length, p->width, p->depth, p->usecs, p->valid_blocks);*/
}
