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
| rect = { | |
| pos = { x = 0, y = 0}, | |
| orientation = 0.7853981634, -- 45Β° in radians (clockwise) | |
| width = 100, | |
| height = 100, | |
| } | |
| seconds_per_frame = 0 | |
| -- Called every frame; if last frame compute didnβt overshoot | |
| -- itβd be called again in 16.667 ms i.e. 60 times in a second. |
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 colored::*; | |
| use std::fmt; | |
| use std::io::{self, BufRead}; | |
| #[derive(Clone)] | |
| struct Cell { | |
| possibilities: String, | |
| } | |
| impl Default for Cell { |
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
| #include <iostream> | |
| #include <bitset> | |
| #include <cstdint> | |
| #include <iomanip> | |
| #include <limits> | |
| #include <sstream> | |
| #include <cmath> | |
| /* | |
| * 8-bit Minifloat mimicing binary32 of IEEE 754/IEC 60559 |
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
| // find the next larger integer from the given number's digits | |
| #include <iostream> | |
| #include <cstring> | |
| int main(int argc, char *argv[]) { | |
| if (argc < 2) { | |
| std::cout << "Usage: nexti <integer>\n"; | |
| return 0; | |
| } | |
| char *str = argv[1]; |
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
| #include <fstream> | |
| #include <iostream> | |
| #include <array> | |
| #include <bitset> | |
| #include <iomanip> | |
| #include <type_traits> | |
| #include <stdexcept> | |
| #include <cstdint> | |
| using DWORD = uint32_t; |