Questions tagged [game-of-life]

A cellular automaton simulation following rules devised by mathematician John Conway.

Filter by
Sorted by
Tagged with
3
votes
2answers
358 views

Class for Conway's Game of Life in C#

I have a class which takes a string representing a grid from Conway's game of life (along with its size, only accepting square grids) and returns the next grid in string format. Can it be improved? ...
4
votes
1answer
216 views

(SBCL) ASCII Game of Life

I'm implementing Conway's Game of Life in Lisp to familiarize myself with the language, with the eventual goal of hosting it on a website with a pretty GUI. I'm a hobbyist and inexperienced (this is ...
2
votes
1answer
78 views

Game of Life component in React

I have been learning webdevelopment at Freecodcamp and have therefore been writing a lot of javascript by myself. They have a code-review chatroom, but the people in that chatroom seem to review the ...
5
votes
1answer
191 views

Conway's Game of Life in Win32/GDI

I've implemented Conway's Game of Life using the raw Windows API and GDI as an exercise. I'm wondering if there is room for improvement, though. Beware, large amount of code following: CGOL.h: <...
2
votes
1answer
61 views

My game of life implementation

I'm looking for comments on both the micro (individual lines of code) and macro (overall design) scale. My input/output format is a single string, with newlines delimiting rows and ...
8
votes
1answer
364 views

Game of life in kivy python

I coded a simulator of the Game Of Life by Conway. I made using Kivy, so that it has a graphical interface. Any suggestion on how to improve its pythonism or performance would be highly appreciated. ...
4
votes
2answers
77 views

GameOfLife on GDX

I would like to know if I did everything right and if there a way to do it more simple and\or better? GameOfLife - main ...
2
votes
2answers
370 views

Java Game Of Life

my Java needed a little refresher so I implemented the Game of Life as a little excercise. The game is working as expected, but I'm sure there is some room for improvement. Here is the code (skipping ...
10
votes
1answer
2k views

Game of Life with NumPy

I started this exercise with NumPy with a goal to find neighbors and return the new matrix. I want to get your feedback. Here's an example from this website. It looks like it's \$O(N^2)\$, and I'm ...
2
votes
1answer
2k views

JavaScript implementation of Conway's Game Of Life With HTML5 Canvas

I've implemented Conway's Game Of Life with pure JavaScript and HTML5 Canvas. I'm not very good at JS patterns, so are there any ideas on how I can improve this code? For Online demo refer to this ...
4
votes
2answers
104 views

One of iteration Conway's Game of Life

I would really like to get some feedback on how you would improve my code's style, readability, and efficiency. I failed an interview recently and was unable to get any feedback so I thought I would ...
5
votes
1answer
455 views

Conways Game of Life in Swing, using OOP

I'm relatively new to coding and was wondering if anyone could review my code? I'm trying to get my head around the concepts of Object-oriented programming in particular. This is an implementation of ...
3
votes
1answer
543 views

Conways Game of Life in cmd batch file

Just for fun I have written a Conway's Game of Life in cmd batch file. I like writing in batch - its restrictions and limits are its appeal. However - it is slow, very slow on a large grid. Any tips ...
3
votes
2answers
187 views

Compact game of life implementation

I am learning F# and implemented Conway's Game of Life as an exercise (There are also other implementations on CodeReview). I have tried to forget all my object-oriented background and practice "...
3
votes
2answers
535 views

One-dimensional circular Conway's Game of Life

I have a program that is working, but it takes way too long to get the answer. With input like 15 100000000 111010111001100 The program checks for 15 numbers, ...
2
votes
3answers
3k views

Game of Life (Java)

This is a simple implementation of Conway's Game of Life in Java. The algorithm I use is inefficient however. Every Cell's neighbors (alive or dead) are checked on every iteration. ...
7
votes
5answers
457 views

Conway's Game of Life and Other Lifelike Cellular Automata Rules

This simulator visualizes Conway's Game of Life and other lifelike cellular automata rule-sets. Features: You can choose from any of the preselected birth/survival thresholds or specify custom ...
2
votes
0answers
583 views

Conways game of life with turtle python 3

A version of CGOL made in Python using the turtle module. Any suggestions for optimisations or improvement: ...
6
votes
2answers
307 views

Parse Run Length Encoded file for cellular automaton data

I wanted to be able to parse Run Length Encoded (*.rle) files into something usable for a cellular automaton simulator (e.g. Conway's Game of Life and such). Here ...
5
votes
2answers
299 views

20×20 Game of Life in C

I am new to C, but have experience with Python and R. The following code implements the Game of Life and represents my first finger exercise in C. I would like to have some feedback regarding the ...
1
vote
0answers
199 views

Java Console version of Conway's Game of Life

This is another out-of-the-head-and-into-the-compiler exercise. This was straight from the editor to code review. I would like suggestions on things to keep in mind when doing such exercises. ...
3
votes
2answers
742 views

Java console version Conway's Game of Life

I did a super simple version of Conway's Game of Life and would like a review. ...
5
votes
1answer
135 views

Game of Life Kata in Bash

I've implemented a Game of Life Kata with the aim to get to know Consul's K/V store. Although not the main purpose of the exercise, it would be nice if somebody reviewed some of the bash code in the ...
5
votes
2answers
268 views

Game of Life, a shorter story

I've been glancing at Game of Life for quite a while, but been reluctant towards graphical packages like pygame. But today I finally got over myself and did it. Did you know that there the "problem" ...
8
votes
1answer
837 views

Conway's Game of Life python

It's my implementation. Can I get some opinions on it? ...
5
votes
1answer
126 views

Game of Life implementation is too slow

I was tasked with implementing Conway's Game of Life. It seems to work fine but the implementation is lacking as I find that it takes a long time to generate the next generation of the grid. I'm ...
2
votes
1answer
4k views

Game of life in C

Game of life is the simplest example of zero player game for cellular automata and it was proposed by mathematician John Conway. I have tried to re implement Nicolas P. Rougier's tutorial for python ...
14
votes
4answers
7k views

'Game of Life' in C#

Unrelated to code: I have only been programming for three weeks, and this is my first project. About the code: Uses a preset grid. It was all done on a single page. This, I realise, was a mistake, ...
8
votes
1answer
336 views

Grid displayer: Game of Life and Langton's Ant

Re-use Given that both the Langton's Ant and the Game of Life use a grid, I decided to code a generic grid_diplayer code and use it both for GoL (Game of Life) and ...
5
votes
2answers
410 views

Functional Conway's Game of Life in JavaScript

In this code, I tried to integrate my little knowledge of (and great fascination towards) functional programming. I'd like to make this code more functional, and faster, if that's possible. ...
2
votes
1answer
1k views

Game of Life - Basic Java GUI Implementation

I've been working on a basic implementation of Conway's Game of Life over the last day, and I've just finished a 'playable' version. If anyone has the time, would you mind making any suggestions on ...
4
votes
1answer
953 views

My version of Conway's Game of Life in Java

I am currently only doing one generation. I'd like a review of my code. Game of Life: The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of ...
8
votes
1answer
281 views

Game of Life in Scala with a sparse representation

While reviewing another Scala implementation of the Game of Life, I ended up drastically rewriting it. The board is represented as a Set[(Int, Int)] containing the ...
6
votes
1answer
378 views

Conway's Game of Life in Scala

To learn Scala, coming from Java and Python, I'm attempting to program an implementation of Conway's Game of Life. I've implemented two different approaches so far, with the first being so bad I'm ...
4
votes
1answer
1k views

Conway's Game Of Life in C#

In the C# Player's Guide book, one of the challenges was to make the game Game of Life in the console. Program.cs ...
9
votes
1answer
793 views

Conway's game of life in C++ with SDL

This is my attempt at a basic implementation of GOL. The user can add and remove cells with the mouse and some basic stats are printed to console. Any feedback is welcome, but I have a couple of ...
2
votes
1answer
271 views

Conway's Game of Life Java Implementation

Keep state the same if it doesn't fall in the following conditions: Change to 2 if there are exactly 2 ones in the neighbors Change to 3 if there are more than 2 ones in the neighbors It is also ...
3
votes
1answer
1k views

Beginner's pygame Conway's Game of Life

Here's my implementation of Game of Life. I'm quite new to Python and would like to know how could I improve that code, especially in terms of performance, compactness and readability. ...
4
votes
1answer
86 views

Building blocks of Life

I'm learning Clojure, and decided to write a Conway's Game of Life clone as my starting project. I ended up dicking around for a bit before diving in, and came up with a few functions that I'd like ...
9
votes
1answer
29k views

Simple Conway's Game of Life implementation in Java

I wrote a simple implementation of Conway's Game of Life in Java using 2 arrays and for loop and used StdDraw library for plotting generations. It turned out that ...
4
votes
1answer
107 views

Conway's Game of Life in Python, saving to an image

I have attempted to make conways game of life in Python, and then save the output into a picture. Is there any way to make this more efficient? Is there anything wrong with the logic? (Most of the ...
14
votes
1answer
269 views

Conway's Game of Life in J

I have the following code which produces successive generations of Conway's Game of Life: ...
3
votes
1answer
768 views

Conway's Game Of Life in Java

I've written a simple demo for Conway's Game Of Life for self-practice. How can I improve the code, especially the processLife() method which traverses and updates ...
5
votes
2answers
394 views

The Game of Life that scored 100%

Note: this is from a COMPLETED course. This is not a ploy to get help with homework, as I have already received a 100% on this assignment (last year). I just want to become a neater programmer. Can ...
6
votes
1answer
185 views

Easy Game of Life project

I've developed easy Game of Life project. I'd highly appreciate any feedback and possibilities to improve my code, both in efficiency and style. It works on list and it's terminal program. ICell.java ...
3
votes
0answers
163 views

Conways Game of Life using unordered set of coordinates

Previously I had been using an array of bool(dead/live) to represent cells. I looked on code review to see how other people have implemented Conway's Game of Life. Someone in the comments of a post ...
8
votes
4answers
854 views

Python Implementation - Conway's Game of Life

This is my implementation of Conway's Game of Life in Python. Now since I am a novice coder, naturally I have some key doubts: The usage of idioms and code redundancies - Are there any small ...
2
votes
1answer
125 views

Attempt at Conway's Game of life

I tried my hands of Conway's Game of life. Well it works as I wanted it to but I want to improve my design and coding practice. I will be glad to get feedback and ideas to improve it and how to code ...
3
votes
1answer
82 views

Game of Life search program for Herschel-generating baits

Golly is a cross-platform, Python and Perl extendable (like in this case, Python), free Conway's Game of Life simulator written in C++ (or Python) that runs in arbitrary speed and large, marvelous ...
26
votes
2answers
817 views

Life is a Game - Play it

I haven't made a game in Excel yet, so I decided to Make Conway's Game of Life. If you wish to play along, I've uploaded the workbook here. Right now it's very rudimentary (No user interface, no ...