Ok, so I thought I'd explain this a bit better.
Rotation test.
http://s749.photobucket.com/albums/xx132/Bigdave876/Cpp/?action=view¤t=rotationTest.jpg
Rotation test. With highlighted spaces( Dark Green ).
http://s749.photobucket.com/albums/xx132/Bigdave876/Cpp/?action=view¤t=rotationTest_spaces.jpg
In the above screenshots, if you look at the bottom shape, in the first column( facing UP ).
You'll see:
If I don't cout the spaces, the .'s above, I'll end up with a shape like so:
Now. If I'm moving this shape into position within an already started game, i.e.:
Because I have to cout the spaces, I'll end up with the following:
█ ███.██
██..█.██
████████ |
Surely there's a more suitable way to store these shapes?
I've thought about just writing each shape to the console. i.e.:
1 2 3 4 5 6 7 8 9 10 11
|
gotoXY( xpos++, ypos )
std::cout << ( char )219;
gotoXY( xpos++, ypos );
std::cout << ( char )219;
gotoXY( xpos, ypos );
std::cout << ( char )219;
gotoXY( xpos, ++ypos );
std::cout << ( char )219;
|
But I'd rather not code that just yet, until I know I
have too. Plus, that way I'd have to code it for each shape, then each rotation of that shape.
Someone please help! lol. I can't really code any further until this is sorted out. If I code the rotation then change from an array, to just cout'ing the shape, I'd have to recode it all.