Added eye editing stuff

This commit is contained in:
MaxRobinsonTheGreat
2020-08-16 15:55:37 -06:00
parent 3d3c6f8558
commit 3589df3919
18 changed files with 151 additions and 154 deletions

View File

@@ -8,7 +8,8 @@ const CellTypes = {
killer: 6,
armor: 7,
eye: 8,
colors: ['#121D29', 'green', 'gray', 'orange', 'white', '#3493EB', 'red', 'purple', '#8D73A3'],
colors: ['#121D29', 'green', 'gray', 'orange', 'white', '#3493EB', 'red', 'purple', '#d4bb3f'],
names: ['Empty', 'Food', 'Wall', 'Mouth', 'Producer', 'Mover', 'Killer', 'Armor', 'Eye'],
getRandomLivingType: function() {
return Math.floor(Math.random() * 6) + 3;
}

View File

@@ -10,7 +10,7 @@ class LocalCell{
this.loc_col = loc_col;
this.loc_row = loc_row;
if (this.type == CellTypes.eye){
this.eye = new Eye(this);
this.eye = new Eye();
if (eye != null) {
this.eye.direction = eye.direction;
}