package com.tutego.insel.game.vj;

class ListOperation implements GameOperation
{
  static ListOperation instace = new ListOperation();

  @Override public String getName()
  {
    return "liste";
  }

  @Override public String apply( GameObject go1, GameObject go2 )
  {
    StringBuilder result = new StringBuilder( go1.name ).append( "-Operationen: " );

    for ( GameOperation op : go1.gameOperations )
      result.append( op.getName() ).append( ' ' );

    return result.toString();
  }
}