slaymaker1907 / triple-triad-ai

GNU General Public License v2.0
5 stars 1 forks source link

Cannot capture cards from the left (west) #3

Closed RubenatorX closed 9 years ago

RubenatorX commented 9 years ago

Cannot capture cards from the left (west) Reproduce (both players manual) 1) Place a card with a 1 on the left in any cell not in the leftmost column. 2) Place any card with not a 1 on the right to the left of the first card. 3) Be disappointed.

RubenatorX commented 9 years ago

CardPlayFunction.java line 116 Reads: tryCapture(toPlay, field.getCard(row, col - 1), cardComparator, result); Should Read: tryCapture(toPlay, field.getCard(row, col + 1), cardComparator, result);

(Its trying to capture the card to its left twice instead of trying the card on its left and then the card on its right).

RubenatorX commented 9 years ago

Pull Request Submitted

slaymaker1907 commented 9 years ago

Fixed in v0.2