Mips - Printing game's board
Hello all I have a mips assignment which is supposed to be a flipping cards game, so I am supposed to print a board which is 4x13
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *
each * represents a card so when I enter the row and column it should flip the card which is in that position for example
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * *
* * * * * * 5A * * * * * * * * *
* * * * * * * * * * * * * * * *
I can print the 开发者_JAVA技巧board using .ascii, but how am I going to flip a card every time I choose a position how to flip the star and print the value every time I enter a position?
You can overwrite your stars in your .ascii data with sb (2 times, according to your example), then just reprint your data.
精彩评论