Skip to content

PyUGAT/coding-dojo-2024-05-20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Langton's Ant ⬜🐜⬛

https://en.wikipedia.org/wiki/Langton%27s_ant

Rules

Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The "ant" moves according to the rules below:

  • At a white square, turn 90° clockwise, flip the color of the square, move forward one unit
  • At a black square, turn 90° counter-clockwise, flip the color of the square, move forward one unit

Run test

pytest
ptw .  # to run via file watcher

About

Langton's Ant'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages