Skip to content

Yet another Conway's Game of Life implimentation in shell script.

License

Notifications You must be signed in to change notification settings

kaznak/ConwayGoL.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConwayGOL.sh

About

Conway’s Game of Life implementation on shell script.

Usage

Those scripts in below of this section are tested on MacOS 10.9 and CentOS 7.2.

Initialize environment.

. rc

Initial pattern.

ido 3 3 example-pattern/glider	|
conwaygol - 0 10 10

One step execution.

ido 3 3 example-pattern/glider	|
conwaygol - 1 10 10

This command shows initial and one step output.

2 step execution.

ido 3 3 example-pattern/glider	|
conwaygol - 2 10 10

This command shows initial, one and two step output.

Play infinite steps on your entire terminal. This will stop with no change between each step. Press Ctrl-C to abort execution.

ido 3 3 example-pattern/glider	|
conwaygol			|
play-screen

You can record the cell changes…

ido 3 3 example-pattern/glider	|
conwaygol			|
play-screen			|
tee rec

and also can replay it.

cat rec			|
while read l ; do
	echo "$l"
	sleep 0.1
done

File tree

  • ConwayGoL
    • .git : git system directory
    • .gitignore : git ignoring file definition
    • README.org : This README file
    • LICENSE : About License
    • rc : Set Environment paramters while development
    • bin : Scripts directory
      • conwaygol : Conway’s game of life implementation
    • util : Utility and library directory
    • example-pattern : Example patterns directory
      • README.org : README file of the directory
      • … some pattern files …

License Note

Some file of util directory is the parts of Open usp Tukubai.

https://github.com/usp-engineers-community/Open-usp-Tukubai

The License is below.

The MIT License

Copyright (C) 2011,2012,2013 Universal Shell Programming Laboratory

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

References

https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

https://ja.wikipedia.org/wiki/%E3%83%A9%E3%82%A4%E3%83%95%E3%82%B2%E3%83%BC%E3%83%A0

http://math.shinshu-u.ac.jp/~hanaki/lifegame/

About

Yet another Conway's Game of Life implimentation in shell script.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages