public Player(int char1) {
        player1type = char1;
        numPlayers = 1;

        //initializes all the player components
        initPlayerType1();
        initPlayerType2();
        //and then makes the one that isnt in use, not visible (deleted)
        //you have to initialize both so the program doesnt get a null pointer
        if (char1 == 1) {
            setVisible2(false);
            //initialize the gravity for the player
            gravity = new Gravity(1);
        } else if (char1 == 2) {
            setVisible(false);
            //initialize the gravity for the player
            gravity = new Gravity(2);
        }



    }