Questions tagged [game-of-life]

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

Filter by
Sorted by
Tagged with
5
votes
1answer
93 views

Game of Life state calculation in javascript

I've created a Life implementation in javascript with the goal to be as fast as possible, with the rendering I'm satisfied (see picture bellow), hovever the next state calculation is really slow and I'...
6
votes
1answer
125 views

Simulation of Conway's Game of Life with periodic boundary conditions

This is exercise 2.4.20. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Implement a class that simulates Conway’s Game of Life. One thing to note: I did not ...
4
votes
0answers
69 views

Game of Life, thread per cell

In an effort to learn Java's support for concurrency I solved a self-imposed exercise to write a Game of Life simulator in Java, running a separate thread for each cell. Here is my code: ...
5
votes
0answers
86 views

Yet another implementation of Conway's Game of life in Haskell

(Sorry for my bad English) Hi, I'm interested in getting feedback of my own implementation of Conway's Game of Life. Some details: Uses gloss for animation Uses rio for shorter dependency list My ...
3
votes
1answer
107 views

Game of life GUI simulation using java.swing

I am fairly new to GUI programming and I am interested in improving my code from every aspect. Performance, security, readability, conciseness, and the look-and-feel aspects are all important to me. ...
3
votes
0answers
53 views

Game of Life in Kotlin

I've implemented a Game of Life in Kotlin. There are some major requirements on this solution: Purely object-functional production code. As close to an infinite universe as possible. File ...
5
votes
3answers
2k views

Learning C: Conway's Game of Life

I'm learning C, so as a practice problem I implemented Conway's Game of Life. For anyone unfamiliar, the problem is set out here. To summarize, there is a grid of "cells" that can be either alive or ...
0
votes
0answers
76 views

Conway's Game of Life using for loops

Is there a better way to write this code? I.e. without using loop and if statement? It's about Conway's Game of Life. Is it possible to solve this using ...
3
votes
1answer
72 views

Conway game of life implemented with C++/OpenCV

Here is an implementation of Conway's Game of Life. It is kind of a brute force but it works fine. I have a special question about the method cv::Mat render() const,...
2
votes
0answers
29 views

A very fast Game of Life

The rules of John Conway's Game of Life are simple: An OFF pixel that has 3 live neighbours is turned ON. An ON pixel that has anything other than 2 or 3 live neighbours is turned OFF. Many people ...
12
votes
5answers
4k views

Coded the Game of Life

I am a beginner to java and I've coded the Game of Life! For those not familiar, the game entails creating a grid of specified dimensions with each box in the grid being either dead or alive. The grid ...
4
votes
2answers
86 views

Rust Conway's Game of Life: struct Board(Vec<Vec<Cell>>)

What do you think of using struct Board(Vec<Vec<Cell>>)? It's nice that I can attach the Display trait, and just ...
3
votes
1answer
128 views

Conway's game of life in C++ using SDL2

I finally finished my Conway's game of life in c++ project and i'd love to find out how to improve the code. main.cpp ...
2
votes
1answer
55 views

Arduino Conways Game of Life using FastLED

So I attempted to write Conway's game of life on an Arduino and display using the FastLED library. I use a custom bitset class to manage the game board state. I'm looking for feedback on performance, ...
5
votes
2answers
141 views

Java implementation of Conway's Game of Life with GUI

I've implemented the Conway's Game of Life in Java, including a GUI. Here's the code of the two classes I wrote: GameOfLife.java ...
7
votes
3answers
417 views

Optimizing Conway's Game of Life in C++

How could I further optimize my implementation of Conway's Game of Life? And how would you critique my current strategies? I'm taking a C++ optimization class, the deadline has passed and my ...
14
votes
3answers
2k views

A Haskell implementation of Conway's Game of Life, viewable on the console, no external libs

This is a Haskell implementation of Conway's Game of Life. It plays on a console. It should be able to play a field of any size, but we only give it a glider on a small field to run at this point. ...
2
votes
1answer
167 views

Game of life using NumPy

I'm trying to improve my Game of life program for school in Python, to be able to run it quicker. So if you have some ideas, I will be glad to hear them. My current code: ...
4
votes
1answer
225 views

C++ beginner wrote Conway's game of life using SFML

I'm an intermediate Java programmer trying to learn the basics of C++. Thus, I decided to write "Conway's game of life" as my second C++ program (I already wrote a Mandelbrot image generator). It was ...
2
votes
2answers
142 views

Cellular automaton (Conway's Game of Life) in python

As a practice exercise, I implemented a cellular automaton (Conway's Game of Life) in python (with help from this tutorial). I am very curious, if this code follows common best practices and I am ...
5
votes
1answer
112 views

Game of Life in Rust-lang

I decided to implement Conways Game of Life for my first project using Rust. I also haven't had much code review ever, and have been looking for a good critique of my code so I can improve my skills. ...
2
votes
1answer
86 views

Code which creates the Game Of life In Java

Link to github Link to github: https://github.com/zombi3123/Game-Of-Life/ Source code: Window.Java ...
4
votes
1answer
580 views

Beginner Console Conway's Game of Life in C

For an Information System Security course I've applied to, I need to learn C and decided to start learning it yesterday. Conway's Game of Life has historically been a good project to start with, so I ...
7
votes
2answers
914 views

Multi-threaded Conway's Game of Life in C++

Here is my implementation of Conway's Game of Life in C++ which takes advantage of multi-threading. I'm using SFML 2.5.1 for a graphics library and CMake. I also use SFML's ...
0
votes
1answer
167 views

Python implementation of Conway's Game of Life [closed]

For learning purpose I've started creating my implementation of Conway's Game of Life. I've used numpy to store big array, contating dead and alive cells, then I've apllied Conway's rules, to create ...
2
votes
1answer
97 views

GOLang Game of Life Implementation

I decided to give Go a try and implemented a Game of Life Kata exercise in GOLang. I have no prior experience in Go and the majority of my experience comes from Java, C#, and Python. My code appears ...
2
votes
1answer
125 views

Game of Life with Scala and Functional Programming

I have been doing OOP and imperative programming my whole career but I wanted to dabble in Scala along with functional programming. Rather than writing Java like code in Scala I wanted to try a more ...
5
votes
1answer
339 views

Game of Life in Ruby

I think Ruby is kinda interesting, so did this Game of life implement in Ruby. I am wonder is there is some magic in Ruby can let my code more elegant. I am a python coder and I think my Ruby kinda ...
7
votes
1answer
129 views

Game of life in Go

I wrote the Game Of Life algorithm with Go. There are a million ways that we can implement the algorithm, but I want to know is it implemented in good-way or not? I wonder how can I improve the ...
5
votes
1answer
93 views

Game of Life implementation with no loops

I began implementing Game of Life for fun, then I challenged myself to implement the game with no loops. I only used STL Algorithms. I don't know how to make pretty GUI's yet but this will print the ...
4
votes
2answers
3k views

Conway's Game of Life in C (3 mode)

This is my program for the Game of life, I created it by myself with no reference or peer review so I need some comments and reviews on it. I created 3 modes: A. User Mode: The program asks the ...
3
votes
1answer
175 views

Implementation of Game of Life in pygame

This is my first project in pygame so I am open to suggestions how I can improve my python/pygame skills. I have started programming in python couple of weeks ago and I really want to know what I am ...
8
votes
2answers
275 views

Conway's Game of Life F#

I am a C# developer learning F#. Would appreciate any suggestions on how this code can be improved. Main points I am interested in: Functional style of the code, absense of imperative style(C#) ...
2
votes
1answer
171 views

Adding GUI to game of life hinders performance

I created a simple game of life and I used console prints to debug and visualize it at first. However, when I tried to introduce GUI (using Python tkinter), the ...
1
vote
2answers
1k views

Conway's Game of Life command line program in C++

I have programmed Conway's Game of Life in C++. ...
3
votes
0answers
81 views

Game of Life as a React app [closed]

I think the general functionality is there, but sometimes it looks a little slow/clunky when I try to run my app. Highlighting cells can be slow as it skips over some of the cells I hover over if my ...
4
votes
2answers
1k views

Java Conway's Game Game of Life

I have implemented Conway's Game of Life simulation. What can I improve? How could I structure my programme better? All suggestions would be appreciated. World.java: ...
3
votes
1answer
133 views

A beginners implementation of Game of Life

I'm totally new to python and coding in general and I tried for my first project to recreate Conway's game of life. After days of trial and error, I came up with this code: ...
4
votes
0answers
746 views

Game of Life simulator, Python 3

Using Python 3.7.0, I've programmed a 'Game of Life' simulator. The output is displayed using tkinter. It's not meant to be limited to just Game of Life, though, as it's meant to also be used for a ...
3
votes
0answers
88 views

Game of Life in Java using Swing

As a hobby project I implemented Game of Life in Java using Swing. I don't have much experience with Java using Swing and would like to get feedback on the code. One thing in particular that I would ...
3
votes
0answers
364 views

Conway's Game Of Life using SFML and MVC

This is a follow-up to my previous question. I followed the given advice and implemented the MVC design pattern. As I've never used MVC before I am quite unsure about the quality or if it is even ...
6
votes
1answer
208 views

Game of life inspired ASCII program

I'd found myself getting back into programming, and had recalled a fascinating little 'game' many might know of. I'm a very inexperienced programmer, and I know this is sloppy, but I'd wanted to make ...
5
votes
1answer
295 views

Conway's game of life in pygame

I've made a game of life in pygame. I need it to get it to run as fast as possible. I've done everything I can think of. ...
5
votes
2answers
1k views

Simple implementation of Conway's game of life with SFML

This is a very simple version of Conway's game of life. It treats the edge of the grid as dead cells and uses a very basic algorithm. Despite this it works fine. As people might not have the SFML ...
13
votes
1answer
352 views

A Pythonic implementation of Conway's Game of Life

I've just finished implementing Conway's Game of Life in python-3.6: ...
3
votes
1answer
388 views

Game of Life improvement

I have finished my code for Conway's Game of Life. I am looking for any advice on how to improve it. I am a C++ beginner, so I used only basic libraries. I am accepting all suggestions. ...
6
votes
3answers
1k views

Python Conway's Game of life

One of my first serious Python programs, realized Conway's Game of Life in Python. Not sure that get_cell_state and update_table functions are good as they might be. Would be glad to see any ...
10
votes
1answer
434 views

Conway's Game of Life implemented in Python

I'm a Python novice and decided to give Game of Life a try in Python 3: ...
6
votes
1answer
112 views

Clojure “Game of Life”

I'm a Clojure beginner and I implemented Game of life to learn how I should code things in Clojure. ...
3
votes
1answer
183 views

Java-based Game Of Life

I've recently had a go at programming a Conway's Game of Life simulation in Java, and I was wondering if anyone could provide some input on how it could be improved. I'm mainly concerned with how to ...