2024-06-17 20:55:01 +00:00
|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:io';
|
2024-02-27 22:00:00 +00:00
|
|
|
|
2024-06-17 20:55:01 +00:00
|
|
|
import 'package:path_provider/path_provider.dart';
|
2024-02-27 22:00:00 +00:00
|
|
|
|
2024-06-17 20:55:01 +00:00
|
|
|
import 'tetrio_multiplayer_replay.dart';
|
2024-02-27 22:00:00 +00:00
|
|
|
|
2024-06-17 20:55:01 +00:00
|
|
|
// That thing allows me to test my new staff i'm trying to implement
|
|
|
|
void main() async {
|
2024-06-18 20:20:42 +00:00
|
|
|
// List<Tetromino> queue = List.from(tetrominoes);
|
|
|
|
// TetrioRNG rng = TetrioRNG(0);
|
|
|
|
// queue = rng.shuffleList(queue);
|
|
|
|
// print(queue);
|
|
|
|
// queue = List.from(tetrominoes);
|
|
|
|
// queue = rng.shuffleList(queue);
|
|
|
|
// print(queue);
|
2024-02-29 22:24:08 +00:00
|
|
|
|
2024-06-18 20:20:42 +00:00
|
|
|
//var downloadPath = await getDownloadsDirectory();
|
2024-06-17 20:55:01 +00:00
|
|
|
var replayJson = jsonDecode(File("/home/dan63047/Документы/replays/6550eecf2ffc5604e6224fc5.ttrm").readAsStringSync());
|
|
|
|
ReplayData replay = ReplayData.fromJson(replayJson);
|
2024-06-18 20:20:42 +00:00
|
|
|
//List<List<Tetromino>> board = [for (var i = 0 ; i < 40; i++) [for (var i = 0 ; i < 10; i++) Tetromino.empty]];
|
|
|
|
List<Event> events = readEventList(replay.rawJson);
|
|
|
|
events.retainWhere((element) => element.type == EventType.ige);
|
|
|
|
print((events[1] as EventIGE).data.data);
|
2024-06-17 20:55:01 +00:00
|
|
|
exit(0);
|
|
|
|
}
|