Giter Site home page Giter Site logo

game-of-life's Introduction


Logo

Game of Life

Clone of the Conway's Game of Life


Table of Contents
  1. 🧭 About The Project
  2. 📋 Getting Started
  3. 💾 Usage
  4. 🔗 Contributing
  5. 📰 License
  6. 📫 Contact
  7. ⛱️ Acknowledgments

🧭 About The Project

🏗️ Built With

List of technologies / frameworks used during the project.

⬆️

📋 Getting Started

This project was given by a class teacher during my master degree. I learned how to work with mindset of TDD (Test driven development), and clean code based on the book.

You can find more information about TDD here : https://fr.wikipedia.org/wiki/Test_driven_development

Clean code book by Richard C. Martin : https://www.oreilly.com/library/view/clean-code-a/9780136083238/

🗺️ Prerequisites

You need JDK 16 for running this project.

Get JDK at this url : https://openjdk.org/projects/jdk/16/

⬆️

💾 Usage

In this project you'll find 3 Class.

Grid

Grid class contain 2 dimensions arrays represent by a board game, you can instance two types of Grid.

  1. With column, row and number of generation
    • The board is initialed with random Cell Alive or Dead at 50% each.
  2. Based on figure, check the file enumeration Figures for more information
    • The board is initialed with dead Cell
    • Than fill to create shape

Also, you have 2 types of running game. First depend on number of generation and second stop when all cells are dead.

The main part of this class is scan. Scan over whole board and store new value in a new board and set old board with the new one at the end.

Cell

Cell class is related about cells contain in the board inside Grid class.

You have 2 types of constructor.

  1. You can choose if cell is alive or not
  2. IsAlive parameter is chosen randomly 50%

Rule method is based on this :

  • Each cell with one or no neighbors dies, as if by solitude.
  • Each cell with four or more neighbors dies, as if by overpopulation.
  • Each cell with two or three neighbors survives.
  • Each cell with three neighbors becomes populated.

Menu

Menu class part interact with user. You can choose over 5 options.

  1. Random game, you'll ask chose column, row and number of generation.
  2. Plane shape, the game start with the shape of Plane
  3. Flashing shape, the game start with the shape of Flashing
  4. While everyone die, you'll ask chose column and row. The game will never end unless there is no cell.
  5. Quit the game

App

You can start the app inside App class, in main function.

Test

All the tests can be run in test folder. Each file test whole functionality for the class Grid and Cell.

⬆️

🔗 Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

⬆️

📰 License

Distributed under the MIT License. See LICENSE.txt for more information.

⬆️

📫 Contact

Reach me at : [email protected].

Project Link: https://github.com/Michelprogram/21-planets.git

⬆️

⛱️ Acknowledgments

This space is a list to resources i found helpful and would like to give credit to.

⬆️

Template inspired by othneildrew

game-of-life's People

Contributors

michelprogram avatar

Stargazers

 avatar

Watchers

Séga S avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.