The Board Game I have in mind is Game of the Generals. It's somewhat similar to Stratego, but I'll just give a quick description of the game; every piece has a rank from Private all the way up to 5-star general, as well as a Spy and a Flag. The higher ranking pieces can eliminate all the lower ranking pieces. The Flag is the lowest ranking piece. The Spy is the highest 'ranking' piece, since it could defeat a 5-star general, but it can be defeated by a Private. None of your pieces are revealed to your opponents. Each piece can only move one square horizontally or vertically per turn.
In the board game, a third person will act as an arbiter, that will judge the pieces should they come into conflict. The arbiter will not reveal the ranks of the pieces, and will simply remove the lower ranked piece. My program hopes to automate this.
Currently, my logic requires the use of a 2D array, where the pieces are in place. A number (from 0 - 14) represents the pieces. As for the arbiter, it will only compare the numbers, and eliminate the lower value (exception would be 1 and 14, since 1 is Private and 14 is Spy). Each piece also contains a string, which would indicate the color of the piece (black or white).
So, basically, I think I have my logic straight. I'd simply like to ask what would be the correct / easiest way to display this as a GUI.
Currently, my GUI makes use of a LOT of buttons (72++) to represent the board. Each button is 'assigned' to the 2D array, and any pieces in the array are then depicted on the button via backgroundImage property. I did this because it seemed rather easy, but I'm not sure if there's any long term effects (performance / memory issues, etc.)
I'm only an intermediate level (student) programmer, so I'm afraid I can only do so much.
Any advice would be greatly appreciated. Thanks in advance.
Edited 5 Years Ago by zack_falcon: n/a