public void connect ( int index ) { try { if ( index == 0 ) { players [ index ] . connect ( true ) ; } else { players [ index ] . connect ( false ) ; } } catch ( Exception ex ) { players [ index ] . handleError ( ex . getMessage ( ) ) ; } pause ( 500 ) ; }
Connect the selected player to the server . The player with index 0 is always the goalie .