Skip to content

snwiem/langtons-ant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Langton’s Ant

This is a simple example project to learn Python development. The initial idea was to have a real life example to implement a fully fledged python project, including packages, modules, tests, mocks and at least documentation based on ASCII-Doc.

During development, I noticed that it would be nice to have graphical interpretation of the ant’s run on the grid.

For that purpose I implemented a simple visualization using pygame engine.

The universal Turing machine

Details can be found here

Tools and Frameworks

  • python 3.9

  • pytest

  • pytest-mock (mocker)

  • pygame

To run

$ python main.py

You will be presented a square window of 800 pixels each dimension. The grid the ant knows about is dynamically created within this viewport. The following key commands are available

ESC

Close window and exit simulation

SPACE

Pause simulation

+

Increase framerate

-

Decrease framerate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages