This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::rc::Rc; | |
| use std::thread::sleep; | |
| use std::time::{Duration, SystemTime}; | |
| #[derive(Clone)] | |
| enum AwaitState<T> { | |
| Uninitialized, | |
| Running, | |
| Complete(T), | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import struct | |
| import tqdm | |
| # states: | |
| # neutral: 0 | |
| # player1: 1, 2, 3 (have 2 of each) | |
| # player2: -1, -2, -3 (have 2 of each) | |
| # board: 3x3 => 9 long tuple (board[i][j] = tuple[i*3 + j]) | |
| # Rotations |