-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from Phuire-Research/UI
UI
- Loading branch information
Showing
39 changed files
with
953 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defaultMethodCreator, defaultReducer } from '../../../model/concept'; | ||
import { ActionType, prepareActionCreator } from '../../../model/action'; | ||
import { createQuality } from '../../../model/concept'; | ||
|
||
export const axiumKickType: ActionType = 'Kick Axium'; | ||
export const axiumKick = prepareActionCreator(axiumKickType); | ||
|
||
export const kickQuality = createQuality( | ||
axiumKickType, | ||
defaultReducer, | ||
defaultMethodCreator | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,30 @@ | ||
import { map, Subject } from 'rxjs'; | ||
import { Action, ActionType, prepareActionCreator } from '../../../model/action'; | ||
import { Method, MethodCreator } from '../../../model/concept'; | ||
import { strategySuccess } from '../../../model/actionStrategy'; | ||
import { defaultMethodCreator, Method, MethodCreator } from '../../../model/concept'; | ||
import { Counter } from '../counter.concept'; | ||
import { createQuality } from '../../../model/concept'; | ||
import { counterSelectCount } from '../counter.selector'; | ||
import { axiumConclude } from '../../axium/qualities/conclude.quality'; | ||
// import { createMethod } from '../../../model/method'; | ||
// import { strategySuccess } from '../../../model/actionStrategy'; | ||
|
||
export const counterAddType: ActionType = 'Counter Add'; | ||
|
||
export const counterAdd = prepareActionCreator(counterAddType); | ||
|
||
// const createAddMethodCreator: MethodCreator = () => createMethod((action) => { | ||
// if (action.strategy) { | ||
// return strategySuccess(action.strategy); | ||
// } | ||
// return action; | ||
// }); | ||
export function addReducer(state: Counter, _: Action) { | ||
return { | ||
...state, | ||
count: state.count + 1 | ||
}; | ||
} | ||
|
||
const addMethodCreator: MethodCreator = () => { | ||
const addSubject = new Subject<Action>(); | ||
const addMethod: Method = addSubject.pipe<Action>( | ||
map((action: Action) => { | ||
if (action.strategy) { | ||
return strategySuccess(action.strategy); | ||
} | ||
return axiumConclude(); | ||
}) | ||
); | ||
return [ | ||
addMethod, | ||
addSubject | ||
]; | ||
}; | ||
|
||
export const addQuality = createQuality( | ||
counterAddType, | ||
addReducer, | ||
addMethodCreator, | ||
defaultMethodCreator, | ||
[counterSelectCount] | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.