locked
Want to make a simple game in c# and xaml, need advices

    General discussion

  • Hi guys, I'm new at programming and need your advices.
    I've to make a simple game. The game consists in a grid of 25 cells (5x5) and every cell contains a button inside.
    A button has two attributes (a name and a color). When the game starts grid is populated by random buttons and then users have to tap button by some rules.
    As you can see it's really simple, and i don't want you to write me the entire code but maybe suggest me how can be the architecture of a game like this (objects for button, list of different button, maybe binding) or give me any resources to learn from.
    Waiting your answer,

    Thank you
    Tuesday, April 14, 2015 1:31 PM

All replies

  • I'd create a class with the information about each button (id, name, colour, etc.) and create a collection of these buttons, then bind them to your grid (likely in an ItemsControl with a Grid as the panel). Template the button controls to look how you'd like based on the underlying data.

    Wednesday, April 15, 2015 4:01 AM
    Moderator