Card Match Game
Two players play a game with n cards arranged in a row. Each card has a positive integer value written on it. On each turn, a player must take either the leftmost or the rightmost remaining card, adding its value to their total score.