cleaned up the gameplay code to make it easy to understand and hack. comments temporarily in french for the mozilla event.