Added matrix state pattern example.