Skip to main content

Timeline for Match 3 game - Check for matches

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Mar 4, 2019 at 3:35 comment added IC_ "I don't believe you can match more than 5 at a time" 00033000 00012000 00021000 03321330 (Add breaklines) Swapping 1 and 2 to get 2 3-matches will cause 3 6-count match
Sep 6, 2015 at 23:53 comment added dimitris93 Oh you are right. I figured it was pointless to add that tile in the list. But indeed it matters.
Sep 6, 2015 at 23:52 comment added Green_qaue Thanks man. Although you dont put the Tile we are checking from in the temp-array, so that tile wont get removed if we find a match, only the neighboring ones
Sep 6, 2015 at 23:48 comment added dimitris93 Notice that my matchedTiles list, is declared inside checkVertical. We don't need to have this list anywhere else, just inside the function. So we won't have to be calling matchedTiles.clear() either.
Sep 6, 2015 at 23:43 comment added Green_qaue Ya I changed that too, I now only check row + 2 if row + 1 was a match
Sep 6, 2015 at 23:42 comment added dimitris93 You are also checking the if statements a bit wrong. Only if the 1 up is true you need to start checking for 2 up. I will edit it soon.
Sep 6, 2015 at 23:40 comment added Green_qaue It works now, I checked if the Tiles were the same, not the Id's.
Sep 6, 2015 at 23:39 comment added dimitris93 I know I am editing your question. Your variable naming choices are also very bad.
Sep 6, 2015 at 23:38 comment added Green_qaue ... One sec, I made a huge blunder
Sep 6, 2015 at 23:35 comment added Green_qaue No, it's inside my "main" class. Where I create the Tiles on board and everything else. I can't put it inside my Tile class, thats just an object. It has no idea what Tiles are neighboring
Sep 6, 2015 at 23:34 comment added dimitris93 Is this function inside your Tile Class ? Or is it in another class ?
Sep 6, 2015 at 23:30 comment added Green_qaue Thank you, I tried your solution but cannot get it working properly. I edited my answer with what I tried, I call checkVertical after I made a move, passing the moved tiles row and col to the method. Then I set the id to 8 (changing the image of the tile) of the tiles that matched if there is a match just for testing to see if it works, but nothing happens.
Sep 6, 2015 at 23:15 history edited dimitris93 CC BY-SA 3.0
added 32 characters in body
Sep 6, 2015 at 23:09 vote accept Green_qaue
Sep 6, 2015 at 23:04 history answered dimitris93 CC BY-SA 3.0