title: Card Game Algorithm
body: <p>I'm asked to develop a card game in c language between 2 players where a player can select the left most or the right most card from a list of cards ex:
  If the list is : [2,14,12,6,20,10] the player may select 2 or 10.
  Finally the player with higher score(sum of cards selected by player) wins the game.
  Is there a way to optimize the selection of a player knowing that not always the best choice is the maximum (ex: choosing 10 in the above case gives opportunity for the other player to select 20 ).
  (Sounds to be a recursive function...)</p>