DOM-based Javascript game