Search code examples
androidrandomdice

Draw random dice to screen


So I know how to draw rectangles to the screen. But I'm looking for for a rectangle with the eyes of a dice. Also saving the result to save later on, how would I do this without using images


Solution

  • Sequence is as follows:

    1. You need to draw a rectangle.
    2. You need to draw points every possible locations (3 lined up, 3 down line and another one in the middle).
    3. Put all the points in invisible mode.
    4. set 6 different modes for numbers 1-6, when any situation you become relevant points visibility.
    5. When the roll of the dice is made, will randomly between the different modes to be selected a particular situation.