Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package org.litesoft.sandbox.multimodule.anywhere.die;

public class Die {
    private State mState;

    public Die( Identifier pIdentifier ) {
        if ( pIdentifier == null ) {
            pIdentifier = new Identifier( Orientation.R, 1, 2 );
        }
        mState = new State( pIdentifier.getOrientation() );
        mState.adjustTo( pIdentifier );
    }

    public Die() {
        this( null );
    }

    public Identifier getCurrentIdentifier() {
        return mState.getIdentifier();
    }

    public int getResult() {
        return mState.getValue();
    }

    public void makeViewResult( View pViewToMakeResult ) {
        switch ( pViewToMakeResult ) {
            default:
            case Result:
                break;
            case North:
                mState.makeNorthResult();
                break;
            case East:
                mState.makeEastResult();
                break;
            case West:
                mState.makeWestResult();
                break;
            case South:
                mState.makeSouthResult();
                break;
            case Other:
                mState.rollOver();
                break;
        }
    }

    public void makeResult( int pValue ) {
        if ( (1 <= pValue) && (pValue <= 6) ) {
            makeViewResult( mState.getViewForValue( pValue ) );
        }
    }
}

Commits for litesoft/trunk/GWT_Sandbox/MultiModuleSingleSrc/main/src/org/litesoft/sandbox/multimodule/anywhere/die/Die.java

Diff revisions: vs.
Revision Author Commited Message
948 Diff Diff GeorgeS picture GeorgeS Sat 07 Jun, 2014 23:42:39 +0000

Jusefuls Formatter Updated to New Code Format

582 GeorgeS picture GeorgeS Mon 14 Nov, 2011 19:55:23 +0000

Single Dir Based MultiModule