html related files and collision detecting

add html related files and update collision detecting algorithm
update rulefunction

update rulefunction wrote  by xujiangfeng
update rulefunction

update rulefunction again
add unit test class

add unit test class