-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNOTES
More file actions
85 lines (60 loc) · 2.44 KB
/
NOTES
File metadata and controls
85 lines (60 loc) · 2.44 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
state.pattern.auto.shooter
----------------------------
* A study case for State design pattern implemented in Java
* A prototype for PC game or real world playful gadget(maybe robots).
* See also: source code comments
* wish list: collective intelligence as in the biology.
* wish list: use antler like tool to modify self code to be
self-monitoring and self-evolving.
*
links:
* Eclipse install
http://github.com/guides/using-the-egit-eclipse-plugin-with-github
http://github.com/guides/providing-your-ssh-key
* Q & A:
20090804
--------
* Yesterday I learned about the workflow impl. in ruby, see the difference
on impl. between state pattern and states in workflow,
* why in cpp, private 'id' property can be used in subclasses? But Java couldn't
20090731
--------
Q: As in the C2,'Making the State Base Class Reusable',
I saw template in cpp equals Java's interface or superclass, how can I reuse code
in java?
A:
tips: due to the limit free space on github, <300M. It is not suggested that
put the .jar files onto the source, keep jar info on .classpath, thus resolve
by hands.
Q: there is no unit test case, how shall I refactor with new ideas? Just follow
the book? Unpleasant!
hint: I guess we have no real behavior, compare with string is useless and waste
of time!
A:
Q: why cpp functions tends to use keyword 'const' for functions?
hint: see more articles on 'const'!
A:
ESP: see from the UML, Figure 2.4,
The way we introduce the global state(sharable state change), is to use a instance
property, when state changes, that property must be always be provoked.
Interesting things may happen that we have list of global state which may overshadow
the real status change?
Q: in chapter 'Adding Messaging Capabilities to Your FSM', the messagin seems to be
not nature in the first thought
e.g. A wizard throws a fireball at an orc. IF orc does not notice? or wizard tricks or use tactics?
e.g. A football player makes a pass to a teammate. IF a intended missing or what?
e.g.
e.g.
Then how to implement?
20090730
--------
Q: Why do I lack new idea?
A: I am not totally in it. Try to exploit any knowledge instead of
always being a beginner.
Q: how to implement status change between auto-pilot and human op?
And auto-pilot has sub status, how to group them together?
A:
Q: how to do unit test for status design pattern?
A:
Q: how Unreal implements the state? like "defend the flag" or "explore map", how quickly the state change?
A: