Skip to content

"The Life" simulation engine designed to showcase the capabilities of creating a console UI application in the Go programming language

License

Notifications You must be signed in to change notification settings

archer-v/simlife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simlife

"The Life Game" simulation engine written in golang. Originally it was the task for a job application interview. Later it was extended with pseudo-graphic console UI, several implementations of the main calculation algorithm with different optimizations, including a multithreaded implementation and comparative performance tests.

This project is solely educational, with the purpose of demonstrating certain aspects of the Go programming language like, how to:

  • Create a console application with pseudo-graphic console UI with windows and resizable layouts
  • Use keyboard and mouse in the console terminal
  • Process startup parameters including commands and flags
  • Use goroutines to utilize all CPU cores efficiently by performing calculations simultaneously in several threads
  • Use channels to synchronize goroutines

vokoscreen-2021-09-15_22-14-48

Console UI Screenshot from 2021-09-15 20-13-14

Startup Flags Screenshot from 2021-09-16 16-40-52

Simulation with short console output Screenshot from 2021-09-16 16-47-35

Simulation with multithreading mode with 10 workers (2.5 times faster compared with standard mode) Screenshot from 2021-09-16 16-46-25

Due to lack of available time to this project, there are a few unsightly, poorly formatted and potentially problematic pieces in this code. It is strongly advised not to use this code in a production environment :-)

About

"The Life" simulation engine designed to showcase the capabilities of creating a console UI application in the Go programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages