Movement and attack code.