Skip to content

PhaelIshall/Intro-Grid-Simulations-Swift-Starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Grid-Simulations-Xcode

Supplementary Xcode project for Grid Simulations tutorial for Make School.

What you will learn

  • Understanding the hierarchy of different files in an xcode project.
  • How to run a project on the iOS simulator or your own iPhone
  • How to create your own simulation.

Common issues

  • Your project will contain more code than you are used to in previous playgrounds, pay extra attention to the scope of your functions and classes, as well as your for loops and if statements. In other words, be careful when you open or close any curly brackets, the meaning code can change drastically and the compiler might give you errors because of this.
  • Remember how to access every cell within the grid to check what element is inside of it.
  • Try to recall how to use tuples. You will be asked to complete a function that returns an array of tuples, the best way to do that is to start with an empty array then add a tuple at a time. Later on, you can call the function, place the result in a variable and loop through it when you need to.
  • Do not make new Setup() and Update() methods and use the ones already in the project. They need to override the Simulation superclass Class' functions.
  • Everytime you work on a different simualtion, remember to call the new function in the update method to test it.
  • Don't forget to change the elements in the palette as you are doing the setup, this is not necessarily in the same class you are working on.
  • To help you out, read up about the simulation class before you start working on your own Simulation!

What you should understand when finished

  • How do you set up your project to run on your iPhone?
  • How to work on different classes.
  • How to properly use nested if statements, and how to optimize them into writing less code?
  • How to debug your code in case it crashes
  • How do you loop through 2D arrays

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 100.0%