Turn-based battle engine written in Node