feat: pgn parser
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package chess.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import chess.controller.Command.CommandResult;
|
||||
import chess.controller.commands.UndoCommand;
|
||||
import chess.controller.event.AsyncGameDispatcher;
|
||||
@@ -42,6 +44,13 @@ public class CommandExecutor {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void executeCommands(List<? extends Command> commands) {
|
||||
for (Command command : commands) {
|
||||
CommandResult result = executeCommand(command);
|
||||
assert result != CommandResult.NotAllowed;
|
||||
}
|
||||
}
|
||||
|
||||
private void processResult(Command command, CommandResult result) {
|
||||
switch (result) {
|
||||
case NotAllowed:
|
||||
|
||||
Reference in New Issue
Block a user