package br.odb.derelict;

import br.odb.gameapp.ConsoleApplication;
import br.odb.gameapp.UserMetaCommandLineAction;

public class SaveCommand extends UserMetaCommandLineAction {
	


	public SaveCommand( ConsoleApplication app ) {
		super( app );

	}

	@Override
	public String getHelp() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int requiredOperands() {
		// TODO Auto-generated method stub
		return 1;
	}
	;

	@Override
	public void run(ConsoleApplication app, String operand) throws Exception {
	
		
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "save";
	}

}

@@ -19,16 +19,46 @@
 elict;%0A%0A
+import java.io.OutputStream;%0A%0A
 import b
@@ -557,17 +557,208 @@
 tion %7B%0A%09
-%0A
+%09LevelEditor editor = (LevelEditor) app;%0A%09%09OutputStream os = app.openAsOutputStream( operand );%0A%09%09%0A%09%09byte%5B%5D bytes = editor.world.toString().getBytes();%0A%09%09%0A%09%09os.write( bytes );%0A%09%09%0A%09%09os.close();
 %09%09%0A%09%7D%0A%0A%09

Save command