0

Grid tiles Coding Problem

Super Hard Q: Given a grid with inputted dimensions and an inputted starting point, how can you make an algorithm that will place the (positionally untouched) tiles link together so that they extend from the left side to the other? The only tile parts that can touch the ends are the circles on the tiles. All of the tiles must be connected, and the tiles must be in alphabetic order (if a piece doesn't fit, you skip and go to the next alphabetical piece, or the beginning if tile C doesn't fit). The grid is numbered, and the user inputs the location of the number of blocked cells, and then the cell number of each blocked cell. A blocked cell cannot be occupied by a tile. Finally, the pieces cannot overlap. I really need help with this problem, and if someone could attempt it, I would be extremely grateful.

24th Feb 2019, 5:27 PM
Matt Sampson
Matt Sampson - avatar
5 Respostas
+ 1
What have you done so far?
24th Feb 2019, 7:58 PM
Diego
Diego - avatar
0
The 3 tiles are tile A: which is three consecutive horizontal blocks -positioned at position 1, it would cover 1,2, and 3 with circles at 1 and 3 Tile B: three tiles shaped like an L: a 5x5 grid, with tile B starting at cell 1, would cover 1, 6, and 7, with circles at 1 and 7 Tile C: 4 tiles shaped like an upside down longer L: a 5x5 grid, with tile C starting at cell 1, would cover cells 1, 2,7, 12, with circles at 1 and 12.
24th Feb 2019, 5:29 PM
Matt Sampson
Matt Sampson - avatar
0
Please help.
24th Feb 2019, 5:30 PM
Matt Sampson
Matt Sampson - avatar
0
Anyone?
24th Feb 2019, 6:47 PM
Matt Sampson
Matt Sampson - avatar
0
I guess no one is here to help?
24th Feb 2019, 7:54 PM
Matt Sampson
Matt Sampson - avatar