Next, create a new class to serve as a cell in your grid.Ĭreate a new file by selecting File\New\File…, choose iOS\Cocoa Touch\Objective-C class and click Next. ![]() Besides, the state of the grid will update via the transition rules you’ll add later in the tutorial. You made the property for the grid private, because you shouldn’t modify it directly from outside the class. Open Cave.m and add the following private property to the class (strong, nonatomic) NSMutableArray *grid Your first step to implement a cellular automaton is to create a grid and put cells into the grid. Are you ready to give your knight something to do? Implementing a Cellular Automaton The code has plenty of comments to help you understand how it works. Take a moment to browse the project and familiarize yourself with the setup.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |