资源说明:My interpretation of the classic game.
Erica Hyman Game of Life in 90 Minutes I chose to represent the game as a 2-dimensional array of ints. The user begins the game by pressing the start button. In my code, this calls the init() function which generates and populates the array with randomly chosen values of 0 or 1. The user can proceed through the generations by clicking the "Next Generation" button. The javascript then calculates the subsequent generation and displays it on the screen. Limitations: Unfortunately I had difficulty getting forms to work. Submitting a custom size (which is not hardcoded) caused the page to refresh, as forms deal mostly with server-side changes. That being said, the program I wrote accounts for edge/corner cases (I couldn't resist) and properly calculates generations in accordance with the rules of the game. Anything I failed to produce here doesn't mean I can't learn to do such things in the future. The HTML is in accordance with the XHTML 1.0 Transitional standard! Hurray!
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。
English
