private static int getIndex(BioBrick brick) { int idx; switch (brick.getType()) { case BioBrick.Type.PROMOTER: idx = 0; break; case BioBrick.Type.RBS: idx = 1; break; case BioBrick.Type.GENE: idx = 2; break; case BioBrick.Type.TERMINATOR: idx = 3; break; default: idx = 0; Logger.Log("CraftZoneManager getIndex unknown type " + brick.getType(), Logger.Level.WARN); break; } return(idx); }
private void insertOrdered(BioBrick toInsert) { foreach (BioBrick brick in _currentBioBricks) { if (brick.getType() > toInsert.getType()) { LinkedListNode <BioBrick> afterNode = _currentBioBricks.Find(brick); _currentBioBricks.AddBefore(afterNode, toInsert); return; } else if (brick.getType() == toInsert.getType()) { LinkedListNode <BioBrick> toReplaceNode = _currentBioBricks.Find(brick); _currentBioBricks.AddAfter(toReplaceNode, toInsert); _currentBioBricks.Remove(brick); return; } } _currentBioBricks.AddLast(toInsert); }
private static int getIndex(BioBrick brick) { int idx; switch(brick.getType()) { case BioBrick.Type.PROMOTER: idx = 0; break; case BioBrick.Type.RBS: idx = 1; break; case BioBrick.Type.GENE: idx = 2; break; case BioBrick.Type.TERMINATOR: idx = 3; break; default: idx = 0; Logger.Log("CraftZoneManager getIndex unknown type "+brick.getType(), Logger.Level.WARN); break; } return idx; }
private static bool checkTerminator(BioBrick b) { Logger.Log("ExpressionModule::checkTerminator("+b+")", Logger.Level.DEBUG); return (b.getType() == BioBrick.Type.TERMINATOR); }
private static bool checkGene(BioBrick b) { Logger.Log("ExpressionModule::checkGene("+b+")", Logger.Level.DEBUG); return (b.getType() == BioBrick.Type.GENE); }
private static bool checkPromoter(BioBrick b) { Logger.Log("ExpressionModule::checkPromoter("+b+")", Logger.Level.DEBUG); return (b.getType() == BioBrick.Type.PROMOTER); }
public static string getSpriteName(BioBrick brick) { return spriteNamesDico[brick.getType()]; }
private static bool checkTerminator(BioBrick b) { Logger.Log("ExpressionModule::checkTerminator(" + b + ")", Logger.Level.DEBUG); return(b.getType() == BioBrick.Type.TERMINATOR); }
private static bool checkGene(BioBrick b) { Logger.Log("ExpressionModule::checkGene(" + b + ")", Logger.Level.DEBUG); return(b.getType() == BioBrick.Type.GENE); }
private static bool checkPromoter(BioBrick b) { Logger.Log("ExpressionModule::checkPromoter(" + b + ")", Logger.Level.DEBUG); return(b.getType() == BioBrick.Type.PROMOTER); }
private static bool checkTerminator(BioBrick b) { return (b.getType() == BioBrick.Type.TERMINATOR); }
private static bool checkRBS(BioBrick b) { return (b.getType() == BioBrick.Type.RBS); }
private static bool checkPromoter(BioBrick b) { return (b.getType() == BioBrick.Type.PROMOTER); }
private static bool checkGene(BioBrick b) { return (b.getType() == BioBrick.Type.GENE); }
public static string getSpriteName(BioBrick brick) { return(spriteNamesDico[brick.getType()]); }
private void insertOrdered(BioBrick toInsert) { foreach(BioBrick brick in _currentBioBricks) { if(brick.getType() > toInsert.getType()) { LinkedListNode<BioBrick> afterNode = _currentBioBricks.Find(brick); _currentBioBricks.AddBefore(afterNode, toInsert); return; } else if(brick.getType() == toInsert.getType()) { LinkedListNode<BioBrick> toReplaceNode = _currentBioBricks.Find(brick); _currentBioBricks.AddAfter(toReplaceNode, toInsert); _currentBioBricks.Remove(brick); return; } } _currentBioBricks.AddLast(toInsert); }