public static Ai parse(char c, Board board, int x, int y) {
    Ai ai = new Ai(x, y, board);
    ai.setIdentity(c);
    ai.setInteractionKeys();

    switch (c) {
    case TileKeys.fireGas:
      ai.setBrain(new GasBrain(ai, board));
      ai.setColor(TileKeys.lightRed);
      ai.decisions = new GasElementDecisions(ai);
      //ai.setColor(new Color((int) (Math.random()*255), 0, 0));
      break;
    case TileKeys.fireLiquid:
      ai.setBrain(new LiquidBrain(ai, board));
      ai.decisions = new LiquidElementDecisions(ai);
      ai.setColor(TileKeys.red);
      break;
    case TileKeys.fireSolid:
      ai.setBrain(new SolidBrain(ai, board));
      ai.decisions = new SolidElementDecisions(ai);
      ai.setColor(TileKeys.darkRed);
      break;
    case TileKeys.earthGas:
      ai.setBrain(new GasBrain(ai, board));
      ai.setColor(TileKeys.lightGreen);
      ai.decisions = new GasElementDecisions(ai);
      break;
    case TileKeys.earthLiquid:
      ai.setBrain(new LiquidBrain(ai, board));
      ai.decisions = new LiquidElementDecisions(ai);
      ai.setColor(TileKeys.green);
      break;
    case TileKeys.earthSolid:
      ai.setBrain(new SolidBrain(ai, board));
      ai.decisions = new SolidElementDecisions(ai);
      ai.setColor(TileKeys.darkGreen);
      break;
    case TileKeys.waterGas:
      ai.setBrain(new GasBrain(ai, board));
      ai.setColor(TileKeys.lightBlue);
      ai.decisions = new GasElementDecisions(ai);
      break;
    case TileKeys.waterLiquid:
      ai.setBrain(new LiquidBrain(ai, board));
      ai.decisions = new LiquidElementDecisions(ai);
      ai.setColor(TileKeys.blue);
      break;
    case TileKeys.waterSolid:
      ai.setBrain(new SolidBrain(ai, board));
      ai.decisions = new SolidElementDecisions(ai);
      ai.setColor(TileKeys.darkBlue);
      break;
    }
    return ai;
  }