Skip to content

SverreNystad/langtons-ant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Langton's Ant Simulation

This was one of my first projects in JavaScript. I wanted to create a simulation that would run in the browser and render on a canvas element. I chose Langton's Ant because it was a simple set of rules that would create a complex pattern. This was a fun project to work on and I learned a lot about JavaScript and the HTML5 Canvas element.

Overview

Langton's Ant follows a set of simple rules which create a path that, despite its randomness, forms emergent order. The simulation runs within a browser and renders on a canvas element, displaying the movement of the ant as it follows its rules on a grid of cells, changing colors and directions based on the current cell's color.

Features

  • Full browser rendering using native HTML5 Canvas.
  • Dynamic grid setup based on browser window size.
  • Simple rule logic for Langton's Ant behavior.
  • Color toggling for grid cells based on ant movement.
  • Basic direction handling to navigate the grid.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages