Initial ghost battle code