2022 Developer Survey is open! Take survey.

Questions tagged [game-of-life]

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

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

Game of life with options like windows and board size

Mainly I am looking for a better way to control the user input in the game loop which is in the first file. Since the nested switch with many ...
user avatar
9 votes
6 answers
3k views

Conway's Game of Life Object oriented implementation in Java

I have designed Conway's Game of Life in Java, the solution follows Object Oriented design and paradigm, please review and let me know the feedback Class Cell Cell ...
user avatar
1 vote
1 answer
109 views

Conway's Game of Life in C++ with a Board Struct

I made the game of Life in C++ for a highschool class project. The website we're using doesn't have an autograder for C++, and my programming teacher doesn't really know how to program... so I'd love ...
user avatar
1 vote
0 answers
17 views

Using React Native to implement Conway's Game of Life

I'm using React Native to implement Conway's Game of Life as a mobile phone app. So far I've implemented the game logic and a main screen with an embedded GLView component where the game board is ...
user avatar
  • 31
2 votes
2 answers
326 views

Improving the Conway's Game of Life Code With Functions in Python

This query is a part of Conway’s game of life. Currently, this program takes about 70 lines of code in Python to return the functionality of the game, which can be simplified to fewer lines of code ...
user avatar
  • 37
0 votes
0 answers
40 views

Game of Life in Typescript

Just a toy project to learn typescript. I haven't made it interactive in any way, though I think I've programmed it in a way where making it interactive should be fairly straight forward: ...
user avatar
  • 219
3 votes
1 answer
58 views

Conway's Game of Life in Powershell

I'm learning PowerShell for professional development, but decided to do a bit of a silly project to help learn scripting in more depth, and chose Conway's Game of Life. This is the first PowerShell ...
user avatar
3 votes
1 answer
88 views

Game of Life in Clojure

I've implemented a Game of Life in Clojure and would like to understand what I can do better, especially in terms of idiomatic Clojure (without losing readability/maintainability) of the current ...
user avatar
0 votes
0 answers
179 views

Conway's Game of Life written in JavaScript

So I'm staying up for 24 hours watching Le Mans and decided to write something fun. I wrote an implementation of Conway's Game of Life (information here if required). All feedback is welcome (...
user avatar
  • 794
6 votes
2 answers
164 views

Conway's game of life as Java OO with underlaying array

Well, there are many game of life's already, but after posting an answer on it in C#, I thought I might as well check if I did any better and if there is anything new to learn - there always is. ...
user avatar
2 votes
1 answer
90 views

Conway's Game of Life in a C# class. Is this sensibly factored and well tested?

I'm learning C# and have written the below class to encapsulate the game state of Conway's Game of Life and its update methods. I'm also learning about implementing light automated unit tests for ...
user avatar
  • 31
4 votes
2 answers
112 views

Game Of Life program in Java

I wrote a program for Conway's Game Of Life in Java. Are there any improvements I could make? main class: ...
user avatar
2 votes
0 answers
29 views

One data object instead of array of objects - why is it slower?

I'm currently writing a game of life with small extra features but I ran into a problem - in my first try i decided to use simple list of Cell objects: ...
user avatar
  • 21
3 votes
1 answer
207 views

Simple terminal Game of Life in Rust

I've been learning Rust for a few weeks in my free time, and as a first project I decided to make a simple terminal Game of Life program (without UI, that might come later). It just starts with a ...
user avatar
2 votes
1 answer
109 views

Game of Life in C/SDL2

My first project in C/SDL2 after completing a short tutorial coding Pong. These 2 projects are my entire experience with both C and SDL2, although I had some previous basic experience with Python. I ...
user avatar
  • 23
1 vote
1 answer
130 views

my implementation of conway's game of life in C++

I found Conway's game of life. I had heard of it, of course, but didn't think it would be so easy and fun to implement. Anyway, here's my code which I know needs a lot of polish: ...
user avatar
1 vote
0 answers
79 views

Game of Life in TypeScript React

This is my first React project. I've included the main files that don't just contain boilerplate. This is a visualization of Conway's Game of Life, with a few toggleable features like starting/...
user avatar
  • 429
7 votes
2 answers
171 views

Game of Life state calculation in javascript

I've created a Game of Life implementation in JavaScript with the goal of having it be as fast as possible, with the rendering I'm satisfied (see picture bellow), however the next state calculation is ...
user avatar
6 votes
1 answer
443 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 ...
user avatar
4 votes
0 answers
91 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: ...
user avatar
  • 571
5 votes
0 answers
234 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 ...
user avatar
  • 51
3 votes
1 answer
576 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. ...
user avatar
3 votes
0 answers
206 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 ...
user avatar
5 votes
3 answers
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 ...
user avatar
  • 161
3 votes
1 answer
231 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,...
user avatar
3 votes
1 answer
81 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 ...
user avatar
  • 4,058
12 votes
5 answers
5k 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 ...
user avatar
3 votes
2 answers
153 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 ...
user avatar
  • 133
3 votes
1 answer
384 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 ...
user avatar
  • 879
2 votes
1 answer
155 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, ...
user avatar
  • 875
5 votes
2 answers
719 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 ...
user avatar
7 votes
3 answers
1k 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 ...
user avatar
  • 105
15 votes
3 answers
3k 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. ...
user avatar
  • 1,538
2 votes
1 answer
334 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: ...
user avatar
  • 67
4 votes
1 answer
353 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 ...
user avatar
2 votes
2 answers
337 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 ...
user avatar
5 votes
1 answer
162 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. ...
user avatar
2 votes
1 answer
102 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 ...
user avatar
  • 31
4 votes
1 answer
1k 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 ...
user avatar
7 votes
2 answers
2k 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 ...
user avatar
  • 173
0 votes
1 answer
254 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 ...
user avatar
  • 121
2 votes
1 answer
169 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 ...
user avatar
  • 145
2 votes
1 answer
227 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 ...
user avatar
  • 145
5 votes
1 answer
593 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 ...
user avatar
7 votes
1 answer
158 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 ...
user avatar
  • 423
5 votes
1 answer
199 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 ...
user avatar
4 votes
2 answers
9k 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 ...
user avatar
3 votes
1 answer
272 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 ...
user avatar
  • 155
8 votes
2 answers
293 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#) ...
user avatar
2 votes
1 answer
180 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 ...
user avatar

1
2 3 4 5