public void actionPerformed(ActionEvent e) {
        //we have to grabfocus every few milliseconds or it doesnt read key inputs
        //its native to java, when you extend JPanel
        grabFocus();
        //call the player objects move method every few seconds  
        p.move();
        //calls all the conditionals for single player
        if (Menu.isSingle()) {
            //moves the camera relative to player
            camera.move();

            if (PlayerPick.getPlayer1Type() == 1) {
                if (p.getY() >= 730) {
                    fallOff = true;
                }
            } else {
                if (p.getY2() >= 800) {
                    fallOff = true;
                }

            }
            //makes the boss move 
            if (mapLoaded) {
                boss.move();
                if (boss.getVisible()) {
                    //fires the bosses missiles
                    for (int d = 0; d < bossMissiles.size(); d++) {
                        Fireball f = (Fireball) bossMissiles.get(d);
                        if (f.getVisible()) {
                            f.move();
                        }
                    }
                }
                if (boss.getHP() <= 0) {
                    boss.setVisible(false);
                    bossDead = true;
                }
            }
            //this part is iffy
            if (p.getHP() <= 0 || p.getHP2() <= 0 || fallOff) {
                lives--;
                tries++;
                mapLoaded = false;
                time.removeActionListener(this);
                init();
            }

            if (!gameOff) {

                if (bossDead) {
                    gameOff = true;
                    time.removeActionListener(this);
                    Fighters.cd.show(Fighters.contentPane, "gamecomplete");
                    lives = 3;
                    tries = 0;
                }

                if (lives <= 0) {
                    gameOff = true;
                    time.removeActionListener(this);
                    Fighters.cd.show(Fighters.contentPane, "gameover");
                    lives = 3;
                    tries = 0;
                }
                if (mapLoaded) {
                    if (boss.getHP() <= 0) {
                        gameOff = true;
                        p.setHP(500);
                        p.setHP2(500);
                    }
                }
            }
            //moves Enemies
            for (int i = 0; i < alien.size(); i++) {
                Enemy a = (Enemy) alien.get(i);
                a.move();
            }

            if (alien.isEmpty()) {
                stageCleared = true;
            }

            if (!bossDead) {
                if (PlayerPick.getPlayer1Type() == 1) {
                    if (p.getX() > 7800 && stageCleared) {
                        boss.setVisible(true);
                    }
                } else {
                    if (p.getX2() > 7800 && stageCleared) {
                        boss.setVisible(true);
                    }
                }
            }
        } else {
            if (p.getHP() <= 0) {
                Fighters.MGW(2);
                time.removeActionListener(this);
                Fighters.cd.show(Fighters.contentPane, "gamecomplete");
            } else if (p.getHP2() <= 0) {
                Fighters.MGW(1);
                time.removeActionListener(this);
                Fighters.cd.show(Fighters.contentPane, "gamecomplete");
            }
            if (p.getX() <= 0) {
                p.setX(p.getX() + 1);
            } else if (p.getX() >= 900) {
                p.setX(p.getX() - 1);
            }
            if (p.getX2() <= 0) {
                p.setX2(p.getX2() + 1);
            } else if (p.getX2() >= 900) {
                p.setX2(p.getX2() - 1);
            }
        }

        //move player 1 fireballs
        for (int d = 0; d < Fireballs.size(); d++) {
            Fireball f = (Fireball) Fireballs.get(d);
            if (f.getVisible()) {
                f.move();
            }
        }
        //draw player 2 fireballs
        for (int d = 0; d < Fireballs2.size(); d++) {
            Fireball f = (Fireball) Fireballs2.get(d);
            if (f.getVisible()) {
                f.move();
            }
        }
        //pretty obvious
        if (mapLoaded) {
            addCollision();
        }
        //clears stage once all the enemies are dead

        //native java method, updates the paint method
        repaint();
    }