added is_game_over() function in js file