Functional implementation of Robot Wars