import java.awt.*;
import java.util.*;

public class GENERIC_GRID{
    
  Vector enemy_vector= new Vector();
  GENERIC_CELL player;
  int MAX_ENEMIES;
  int col;
  int score, next;
  boolean gameOn = true;  

  GENERIC_GRID(){
    MAX_ENEMIES = 3;
    col = 2;
    score = 0;
    player = new GENERIC_CELL(50,210,Color.blue);
  }

  public int getScore(){
    return score;
  }

  public void move_player(int m){
    if(col>0 && m==-1){
        col--;
        player.moveX(m);
    }
    else if(col<5 && m==1){
        col++;
        player.moveX(m);
    }
    else if(player.x<210 && m==2){
        player.moveDown();
    }
    else if(player.x>30 && m==-2){
        player.moveUp();
    }
  }

  public boolean keepPlaying(){
    return gameOn;
  }

  public void endGame(){
    gameOn=false;
  }

  public void draw(Graphics g){
    player.draw(g);
    g.setColor(Color.black);
    g.drawRect(30,10,60,210);
  }
}

