Hi all,
I'm struggling with something that might look simple but has been giving me headaches the last 2 days, I was wondering how to do this:
I have a matrix of cards
(x,y)
Cells are labeled like this:
The player can choose any card as Target
and then a second card adjacent to it (not diagonally) as direction to shift that entire row or column.
(this is a circular shift and the card on position 31 for example would enter the row from the other side in position 01)
What you think is the best method to do this?
I-ve been thinking in creating an array with the values from the database with the row or column selected and then use PUSH and POP to rearrange the cards. But I was wondering if there is something more efficient.
I'm struggling with something that might look simple but has been giving me headaches the last 2 days, I was wondering how to do this:
I have a matrix of cards
(x,y)
Cells are labeled like this:
Code: Select all
03 13 23 33
02 12 22 32
01 11 21 31
00 10 20 30
and then a second card adjacent to it (not diagonally) as direction to shift that entire row or column.
(this is a circular shift and the card on position 31 for example would enter the row from the other side in position 01)
What you think is the best method to do this?
I-ve been thinking in creating an array with the values from the database with the row or column selected and then use PUSH and POP to rearrange the cards. But I was wondering if there is something more efficient.