state pattern example, not very good

a little demo of state pattern, obj receive cmd from outside, not a
self-loop cicle