Bughouse implementation using JavaScript, AJAX and PHP