package com.github.dtschust.zork.repl.actions;
import com.github.dtschust.zork.ZorkGame;
import com.github.dtschust.zork.repl.Action;
import java.util.List;
/**
* The "Game Over" action marks the end of the game.
*/
public class GameOverAction implements Action {
@Override
public boolean matchesInput(List<String> arguments) {
return arguments.get(0).equals("Game") && arguments.get(1).equals("Over");
}
public int getMinimumArgCount() {
return 2;
public boolean run(ZorkGame game, List<String> arguments) {
System.out.println("Victory!");
game.setGameOver();
return true;