public int makeTurn(int loc[]){
        /* ensures the game isn't done */
        if(state > 0){return 0;}
        
        int fturn;
        
        /* quick reference to who's turn it is */
        if (turn == false){ fturn = 1; }
        else{ fturn = 2; }
        
        /* check if the move is legal 
         * or in other words, the first 2 elements of 
         * loc, are equal to the 2 elements of lastmove
         */
        if (loc[0] != lastmove[0] || loc[1] != lastmove[1]){
            return 0;
        }
        
        /* checks to make sure that the square is empty 
         * or in other words, value == 0
         */
        int value = newGame.getState(loc).getState(loc[2], loc[3]);
        if (value > 0){return 0;} 
        
        /* if it is empty, make the move */
        newGame.setState(loc,fturn);
        
        /* change the turn setting */
        turn = !turn;
        
        /* update the last move array */
        lastmove[0] = loc[2];
        lastmove[1] = loc[3];
        lastmove[2] = loc[0];
        lastmove[3] = loc[1];
        
        /* determine if the game is over */
        if (Util.game_done(newGame) >= 1){
            state = Util.game_done(newGame);
        }
        
       return 1; 
    }