implemented gameplay algorithm and updated makefile