gbrivady / in101-project Goto Github PK
View Code? Open in Web Editor NEWLil backup of the IN101 Project
Lil backup of the IN101 Project
IN101 mini project. This project is an implementation of Conway's Game of Life. There are two differents implementation : the first one represents the universe as a grid of character, and will be called the naive implementation. The second one uses linked list to represent only the living cells of the universe, and will be called the list implementation. This project allows to load the initial configuration of the universe from a text file, and produces a list of images corresponding to each step of the simulation. In the naive implementation, the universe is assumed to be a torus. In the list implementation, the universe expands as cells get past its boundaries. /* Creating a universe */ The initial configuration of the universe must be stored in a text file, following this format : - the universe must be a rectangle - the first line of the file contains the height and the width of the universe, separated by a space - the second line of the file contains the number of simulation steps - alive cells are represented by the character 'o' - empty cells are represented by the character '.' The data folder contains examples. /* Launching a naive simulation */ To create the executable for the application, use : make app-naive-conway To run the simulation with the initial configuration filepath/your_file.txt use the command: ./app-naive-conway filepath/your_file.txt Example : the command "./app-naive-conway ./data/glider.txt" will run 10 steps of the simulation with a 21x20 universe containing only a single glider on the top-left corner. /* Launching a list simulation */ To create the executable for the application, use : make app-list-conway To run the simulation with the initial configuration filepath/your_file.txt use the command: ./app-list-conway filepath/your_file.txt Example : the command "./app-list-conway ./data/glider.txt" will run 10 steps of the simulation with a 21x20 universe containing only a single glider on the top-left corner. /* Image output */ Images are stored in the out folder. They are PPM images following this format : - a black pixel represents an empty cell - a white pixel represents a living cell - img-XXX.ppm represents the XXXth step of the simulation, with XXX = 000 being the initial configuration. It is possible to produce a video.mp4 video file from the images generated by using the command : make video The video will be on the root folder. To delete the video and the images, use the command: make clean-img
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.