bloc referral

If you are interested in learning to code with a mentor, try bloc and get $100 off.

Saturday, April 12, 2014

Conway's Game of Life problem

After having a nice phone call with a recruiter on Wednesday I was given the assignment to write a program using the rules for Conway's Game of Life. I looked forward to completing this assignment was nervous and excited to start. I previously worked on this problem during the Code Retreat in November. During that that day I approached the problem in a pair with 5 different partners. This definitely helped me in approaching the problem.

The excited got to me and I spent 6 hours on Thursday working through the problem using TDD. This first project using TDD outside of Rails and not following a tutorial, which is why it took me 6 hours to build a board and functionality. I have yet to start the first rule of the game:

  1. Any live cell with fewer than two live neighbours dies, as if caused by under-population.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overcrowding.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

I plan to spend another 6-10 hours on it this weekend. I hope that it does not take that long but am enjoying the experience I am gaining from this. After this I hope to finish my Tic Tac Toe app using TDD, but I might need to give myself a week.

I am currently stuck on check each cell for live cells and adding them to the array called live_neightbors_around. The test is not passing as of yet, but will hopefully will today, now that my brain has rested for a day.


No comments:

Post a Comment