Correct tile movement for a 2048 game
问题 I decided to make a 2048 Command Line Edition but I'm having trouble getting the right tile movement... My current structure is that the board is a 2D array (4x4) of ints. When an input is received, it will try to push every tile in that direction (ignoring tiles with value 0), if it notices a change it will start over (Because a tile on the bottom row will have to go all the way up, not just one step up). However, a side effect of this is the following problem: [2][2][4] with the command ->