import: Allow import , and ;

This commit is contained in:
Calcitem 2021-06-12 03:14:56 +08:00
parent b49ab4ff20
commit 1fdc1c6a73
1 changed files with 6 additions and 1 deletions

View File

@ -68,7 +68,12 @@ class GameRecorder {
String import(String moveList) {
List<Move> newHistory = [];
List<String> list = moveList.toLowerCase().replaceAll('\n', ' ').split(' ');
List<String> list = moveList
.toLowerCase()
.replaceAll('\n', ' ')
.replaceAll(',', ' ')
.replaceAll(';', ' ')
.split(' ');
for (var i in list) {
i = i.trim();