Jump to content

Conway's Game of Life/Java/Swing: Difference between revisions

m
Hardcoded value changed to its variable counterpart.
(Added the Java swing based implementation to cut down on clutter on the main page. (as discussed on the main talk page))
 
m (Hardcoded value changed to its variable counterpart.)
Line 200:
public void addPoint(MouseEvent me) {
int x = me.getPoint().x/10BLOCK_SIZE-1;
int y = me.getPoint().y/10BLOCK_SIZE-1;
if ((x >= 0) && (x < d_gameBoardSize.width) && (y >= 0) && (y < d_gameBoardSize.height)) {
addPoint(x,y);
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.