If it is player 1 's turn then  current picked score added to  his total. choose maximum of  the two scores as P1 tries to  maximize his score.
if ( money [ beg ] + scoreOne [ 0 ] > money [ ed ] + scoreTwo [ 0 ] ) : NEW_LINE INDENT return [ money [ beg ] + scoreOne [ 0 ] , " L " + scoreOne [ 1 ] ] NEW_LINE DEDENT else : NEW_LINE INDENT return [ money [ ed ] + scoreTwo [ 0 ] , " R " + scoreTwo [ 1 ] ] NEW_LINE DEDENT