Skip to content

Conway's Game of Life. This repository include a DLL which can help you to make a "Game of Life".

License

Notifications You must be signed in to change notification settings

ulurn-av/Conways-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

Repository files navigation

GifforGit

Dll for "Game of Life" GitHub license

Conway's Game of Life. This is repository includes a DLL which can help you to make a "Game of Life".

Contents

Ctor

  public GameLogic(int rows, int columns, int density = 2) {}

You can use ctor with 3 or 2 parameters without them you can't.

For exemple you can call ctor like that:

  static GameLogic gameLogic = new GameLogic
  (
      rows: Console.WindowHeight,
      columns: Console.WindowWidth,
      density: density
  );

Or without density.

Methods

  • Generation
  public void Generation() {}

Method is using without parameters, and using for build a next generation.

  • CountOfNeighbors
  private int CountOfNeighbors(int x, int y)

Method is using with 2 parameters, and using by method Generation for count of neighbors cell. Generally you won't use this method he is exist for Generation method.

  • GetGeneration
  public bool[,] GetGeneration()

GetGeneration is return an array bool[,]. This method using for getting a generation and then output it in Console or PictureBox in Windows Forms.

Download a Dll

About

Conway's Game of Life. This repository include a DLL which can help you to make a "Game of Life".

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages