Assigning Specific Digit to a Value Or Use a String Method?

Hello, all.

Presently, I am trying to program a game. In it, the game board is made up if a 2D integer array.
The integers are 2 digits long, i.e. xy.

The first digit, x, represents the soldier type currently occupying the space.
The second digit, y, represents the terrain type currently occupying the space.

My question is:
is it possible to assign values to x and y without changing the other digit? If so, how?

Or, would it be easier if I used a string/char instead (since I know for sure it is possible to assign values to string[n] or char[n])?
I would prefer making an array of structures instead.
Thanks for your help. I will look into this.
Topic archived. No new replies allowed.