Bot written in javascript that plays 2048 game