Oh, let me explain.
At the begining of the game, every cell in depth1 is empty.
When in the begining of the game player performs action D, then x is stored in depth1 where D stands in depth0. Then when payer performs F, then x+A is stored in depth1 where F stands in depth0, etc
I'm not sorting anything, just putting incremented variable in the array cells at their corresponding action coordinate.