Sven Hendriks is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againconway overview
Recent commits See more »
| Author | Revision | Comments | Message | Labels | Date |
|---|---|---|---|---|---|
|
|
832ca35e96a3 |
Updated README file. |
|
||
|
|
215bfb8f72ed |
Added tag 0.0.2b for changeset dd59cd6cf66f |
|
||
|
|
dd59cd6cf66f |
Merged default head into production. |
|
||
|
|
c45680ef5ed8 |
Added small demo. |
|
||
|
|
9258de2acf50 |
Added tag 0.0.1b for changeset 84bb32582ea0 |
|
jQuery conway plugin
Author and license
Copyright (c) 2011, Sven Hendriks (hendriks.sven@googlemail.com) Licensed under the GPL Version 2 license.
Overview
This piece of code implements Conway's Game of Life as a jQuery plugin.
It supports separate layers of activity, each one simulating its own conway universe. Different layers use different colors. The colors of overlapping active cells from different layers are mixed for your viewing pleasure.
Dependencies
This code relies on the jQuery xcolor plugin. This can be found here: http://www.xarg.org/project/jquery-color-plugin-xcolor/
Usage
- You need to define a div element like so:
<div id="letsrock"></div>
- Then call the conway plugin:
<script type="text/javascript">
$(document).ready(function() {
$('#letsrock').conway({
rows: 8,
cols: 16
});
$('#letsrock').conway('start');
});
</script>