package com.tutego.insel.game.vj;

import java.util.ArrayList;

abstract class GameObject
{
  String name;
  ArrayList<GameOperation> gameOperations = new ArrayList<GameOperation>();

  GameObject()
  {
    addOperation( ListOperation.instace );
  }

  void addOperation( GameOperation op )
  {
    gameOperations.add( op );
  }

  GameOperation getOperationByName( String opName )
  {
    for ( GameOperation named : gameOperations )
      if ( named.getName().equalsIgnoreCase( opName ) )
          return named;

    return null;
  }
}
