From 7a9054b94a81a16b591ad0de4f7ca97c4a435d34 Mon Sep 17 00:00:00 2001 From: Wataru Inariba Date: Sun, 1 Oct 2023 04:56:47 +0900 Subject: [PATCH] cosmetic --- package-lock.json | 14 +++--- package.json | 2 +- src-tauri/Cargo.lock | 81 +++++++++++++++++++++++-------- src-tauri/Cargo.toml | 2 +- src-tauri/src/solver.rs | 17 +++---- src-tauri/src/tree.rs | 17 +++---- src/components/BoardSelector.vue | 2 +- src/components/BunchingEffect.vue | 15 ++++-- src/components/ResultChance.vue | 2 +- 9 files changed, 99 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0f29b28..95fd35e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@rushstack/eslint-patch": "^1.5.0", "@tailwindcss/forms": "^0.5.6", "@tauri-apps/cli": "^1.5.0", - "@types/node": "^20.7.1", + "@types/node": "^20.8.0", "@vitejs/plugin-vue": "^4.3.4", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^12.0.0", @@ -861,9 +861,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", - "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==", + "version": "20.8.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.0.tgz", + "integrity": "sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==", "dev": true }, "node_modules/@types/semver": { @@ -1841,9 +1841,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.536", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.536.tgz", - "integrity": "sha512-L4VgC/76m6y8WVCgnw5kJy/xs7hXrViCFdNKVG8Y7B2isfwrFryFyJzumh3ugxhd/oB1uEaEEvRdmeLrnd7OFA==", + "version": "1.4.537", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.537.tgz", + "integrity": "sha512-W1+g9qs9hviII0HAwOdehGYkr+zt7KKdmCcJcjH0mYg6oL8+ioT3Skjmt7BLoAQqXhjf40AXd+HlR4oAWMlXjA==", "dev": true }, "node_modules/esbuild": { diff --git a/package.json b/package.json index 93ad1c6..08af1df 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@rushstack/eslint-patch": "^1.5.0", "@tailwindcss/forms": "^0.5.6", "@tauri-apps/cli": "^1.5.0", - "@types/node": "^20.7.1", + "@types/node": "^20.8.0", "@vitejs/plugin-vue": "^4.3.4", "@vue/eslint-config-prettier": "^8.0.0", "@vue/eslint-config-typescript": "^12.0.0", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 7bf3f07..25af496 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -260,6 +260,7 @@ version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ + "jobserver", "libc", ] @@ -1339,9 +1340,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad227c3af19d4914570ad36d30409928b75967c298feb9ea1969db3a610bb14e" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", "hashbrown 0.14.1", @@ -1421,6 +1422,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jobserver" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" version = "0.3.64" @@ -1490,9 +1500,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "lock_api" @@ -2014,12 +2024,13 @@ dependencies = [ [[package]] name = "postflop-solver" version = "0.1.0" -source = "git+https://github.com/b-inary/postflop-solver#7ba56e7263fb295a40b7296a556dc3a72b9eda73" +source = "git+https://github.com/b-inary/postflop-solver#f3e25657e8d50e93dcf0ba516e58ed06eae5f20a" dependencies = [ "bincode", "once_cell", "rayon", "regex", + "zstd", ] [[package]] @@ -2239,13 +2250,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", + "regex-automata 0.3.9", "regex-syntax 0.7.5", ] @@ -2260,9 +2271,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", @@ -2322,9 +2333,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.14" +version = "0.38.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747c788e9ce8e92b12cd485c49ddf90723550b654b32508f979b71a7b1ecda4f" +checksum = "d2f9da0cbd88f9f09e7814e388301c8414c51c62aa6ce1e4b5c551d49d96e531" dependencies = [ "bitflags 2.4.0", "errno", @@ -2462,7 +2473,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.1", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -2823,9 +2834,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a62b3327886e7ef2978adc668432f1cc53f14e1d46e7ae04f730f4d48584623" +checksum = "defbfc551bd38ab997e5f8e458f87396d2559d05ce32095076ad6c30f7fc5f9c" dependencies = [ "anyhow", "cargo_toml", @@ -3112,7 +3123,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.1", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -3851,3 +3862,33 @@ checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" dependencies = [ "libc", ] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2aec849..866a341 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -11,7 +11,7 @@ rust-version = "1.65" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.4.1", features = [] } +tauri-build = { version = "1.5.0", features = [] } [dependencies] serde_json = "1.0.107" diff --git a/src-tauri/src/solver.rs b/src-tauri/src/solver.rs index f12ad60..84f44c4 100644 --- a/src-tauri/src/solver.rs +++ b/src-tauri/src/solver.rs @@ -117,25 +117,24 @@ pub fn game_init( rake_rate, rake_cap, flop_bet_sizes: [ - BetSizeCandidates::try_from((oop_flop_bet.as_str(), oop_flop_raise.as_str())).unwrap(), - BetSizeCandidates::try_from((ip_flop_bet.as_str(), ip_flop_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_flop_bet.as_str(), oop_flop_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_flop_bet.as_str(), ip_flop_raise.as_str())).unwrap(), ], turn_bet_sizes: [ - BetSizeCandidates::try_from((oop_turn_bet.as_str(), oop_turn_raise.as_str())).unwrap(), - BetSizeCandidates::try_from((ip_turn_bet.as_str(), ip_turn_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_turn_bet.as_str(), oop_turn_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_turn_bet.as_str(), ip_turn_raise.as_str())).unwrap(), ], river_bet_sizes: [ - BetSizeCandidates::try_from((oop_river_bet.as_str(), oop_river_raise.as_str())) - .unwrap(), - BetSizeCandidates::try_from((ip_river_bet.as_str(), ip_river_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_river_bet.as_str(), oop_river_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_river_bet.as_str(), ip_river_raise.as_str())).unwrap(), ], turn_donk_sizes: match donk_option { false => None, - true => DonkSizeCandidates::try_from(oop_turn_donk.as_str()).ok(), + true => DonkSizeOptions::try_from(oop_turn_donk.as_str()).ok(), }, river_donk_sizes: match donk_option { false => None, - true => DonkSizeCandidates::try_from(oop_river_donk.as_str()).ok(), + true => DonkSizeOptions::try_from(oop_river_donk.as_str()).ok(), }, add_allin_threshold, force_allin_threshold, diff --git a/src-tauri/src/tree.rs b/src-tauri/src/tree.rs index f6fde2a..c000e83 100644 --- a/src-tauri/src/tree.rs +++ b/src-tauri/src/tree.rs @@ -122,25 +122,24 @@ pub fn tree_new( rake_rate: 0.0, rake_cap: 0.0, flop_bet_sizes: [ - BetSizeCandidates::try_from((oop_flop_bet.as_str(), oop_flop_raise.as_str())).unwrap(), - BetSizeCandidates::try_from((ip_flop_bet.as_str(), ip_flop_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_flop_bet.as_str(), oop_flop_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_flop_bet.as_str(), ip_flop_raise.as_str())).unwrap(), ], turn_bet_sizes: [ - BetSizeCandidates::try_from((oop_turn_bet.as_str(), oop_turn_raise.as_str())).unwrap(), - BetSizeCandidates::try_from((ip_turn_bet.as_str(), ip_turn_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_turn_bet.as_str(), oop_turn_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_turn_bet.as_str(), ip_turn_raise.as_str())).unwrap(), ], river_bet_sizes: [ - BetSizeCandidates::try_from((oop_river_bet.as_str(), oop_river_raise.as_str())) - .unwrap(), - BetSizeCandidates::try_from((ip_river_bet.as_str(), ip_river_raise.as_str())).unwrap(), + BetSizeOptions::try_from((oop_river_bet.as_str(), oop_river_raise.as_str())).unwrap(), + BetSizeOptions::try_from((ip_river_bet.as_str(), ip_river_raise.as_str())).unwrap(), ], turn_donk_sizes: match donk_option { false => None, - true => DonkSizeCandidates::try_from(oop_turn_donk.as_str()).ok(), + true => DonkSizeOptions::try_from(oop_turn_donk.as_str()).ok(), }, river_donk_sizes: match donk_option { false => None, - true => DonkSizeCandidates::try_from(oop_river_donk.as_str()).ok(), + true => DonkSizeOptions::try_from(oop_river_donk.as_str()).ok(), }, add_allin_threshold, force_allin_threshold, diff --git a/src/components/BoardSelector.vue b/src/components/BoardSelector.vue index d096e00..c948bd1 100644 --- a/src/components/BoardSelector.vue +++ b/src/components/BoardSelector.vue @@ -14,7 +14,7 @@ diff --git a/src/components/BunchingEffect.vue b/src/components/BunchingEffect.vue index f09487d..069e087 100644 --- a/src/components/BunchingEffect.vue +++ b/src/components/BunchingEffect.vue @@ -2,10 +2,14 @@
- Enabling the bunching effect will significantly slow down the solver.
- If you are not sure, we recommend leaving it disabled. + +
+ Enabling the bunching effect will significantly slow down the + solver.
+ If you are not sure, we recommend leaving it disabled. +
@@ -204,7 +208,10 @@ import * as invokes from "../invokes"; import RangeEditor from "./RangeEditor.vue"; import RangeMiniViewer from "./RangeMiniViewer.vue"; import { Tippy } from "vue-tippy"; -import { QuestionMarkCircleIcon } from "@heroicons/vue/20/solid"; +import { + InformationCircleIcon, + QuestionMarkCircleIcon, +} from "@heroicons/vue/20/solid"; const store = useStore(); const configStore = useConfigStore(); diff --git a/src/components/ResultChance.vue b/src/components/ResultChance.vue index 8c1271f..66c7250 100644 --- a/src/components/ResultChance.vue +++ b/src/components/ResultChance.vue @@ -51,7 +51,7 @@