P5js/generative_logo_hexagons/hexagon_tiles.js
//Check how many Neighbours are active
Check how many Neighbours are active
Check how many Neighbours are active
countActiveNeighbours() {
    this.activecount=0;
    for (let i = 0; i < 6; i++) {
      if (this.neighbours[i] && this.neighbours[i].active) {
        this.activecount++;
      }
    }
  }
countActiveNeighbours ( ) { this . activecount = 0 ; for ( let i = 0 ; i < 6 ; i ++ ) { if ( this . neighbours [ i ] && this . neighbours [ i ] . active ) { this . activecount ++ ; } } }
Check how many Neighbours are active
Check how many Neighbours are active
// returns number of active neighbours