diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/lib94/lib94.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/lib94/lib94.hpp b/include/lib94/lib94.hpp index 63f862e..0766af7 100644 --- a/include/lib94/lib94.hpp +++ b/include/lib94/lib94.hpp @@ -147,6 +147,17 @@ namespace lib94 { template <bool update_address_sets> const warrior *single_step(); + //convenience method - reads the contents of a file and then calls compile_warrior. + //if the file cannot be read, returns a null pointer. see comment on compile_warrior. + warrior *compile_warrior_from_file(std::string path); + + //convenience method - calls clear_core(background), then init_round(warriors, count, + //offsets, shuffle), then single_step<false> until either one warrior remains or that + //has been called rounds_to_tie times. if one warrior remains, returns the pointer to + //that warrior. if a tie is reached, returns a null pointer. this asserts that the call + //to init_round returns true. see comment on init_round. + const warrior *do_round(const instruction &background, const warrior *const *warriors, size_t count, const number_t *offsets, bool shuffle, long rounds_to_tie); + } #endif |