diff --git a/apps/desktop/src/i18n.rs b/apps/desktop/src/i18n.rs index f902e49..4ae0308 100644 --- a/apps/desktop/src/i18n.rs +++ b/apps/desktop/src/i18n.rs @@ -10649,39 +10649,6 @@ const ROWS: &[[&str; 9]] = &[ "Qo‘shimcha, s:", "Қосымша, с:", ], - [ - "Weaker", - "Слабее", - "Plus faible", - "Schwächer", - "Más débil", - "Più debole", - "Mais fraco", - "Kuchsizroq", - "Әлсіздеу", - ], - [ - "As me", - "Как я", - "Comme moi", - "Wie ich", - "Como yo", - "Come me", - "Como eu", - "Men kabi", - "Мендей", - ], - [ - "Stronger", - "Сильнее", - "Plus fort", - "Stärker", - "Más fuerte", - "Più forte", - "Mais forte", - "Kuchliroq", - "Күштірек", - ], [ "Play", "Играть", @@ -10913,17 +10880,6 @@ const ROWS: &[[&str; 9]] = &[ "Lichess shkalasi: Maia 1500 reytingi 1500 bo‘lgan klub o‘yinchisidan kuchsizroq.", "Lichess шкаласы: Maia 1500 рейтингі 1500 клуб ойыншысынан әлсіздеу.", ], - [ - "Enter your rating: Weaker · As me · Stronger will choose for you", - "Укажите рейтинг — сила подберётся кнопками Слабее · Как я · Сильнее", - "Indiquez votre classement : Plus faible · Comme moi · Plus fort choisiront pour vous", - "Geben Sie Ihre Wertung ein: Schwächer · Wie ich · Stärker wählen dann für Sie", - "Indica tu rating: Más débil · Como yo · Más fuerte elegirán por ti", - "Inserisci il tuo rating: Più debole · Come me · Più forte sceglieranno per te", - "Informe seu rating: Mais fraco · Como eu · Mais forte escolherão por você", - "Reytingingizni kiriting: Kuchsizroq · Men kabi · Kuchliroq siz uchun tanlaydi", - "Рейтингіңізді енгізіңіз: Әлсіздеу · Мендей · Күштірек өзі таңдайды", - ], [ "Maia resigned", "Maia сдалась", diff --git a/apps/desktop/src/play.rs b/apps/desktop/src/play.rs index 8374240..e10592a 100644 --- a/apps/desktop/src/play.rs +++ b/apps/desktop/src/play.rs @@ -152,11 +152,6 @@ impl Default for PlayPrefs { pub const STRENGTH_MIN: u32 = 600; pub const STRENGTH_MAX: u32 = 2600; -/// «As me»: the user's rating rounded to 100, within Maia's range. -pub fn strength_like(rating: u32) -> u32 { - (((rating + 50) / 100) * 100).clamp(STRENGTH_MIN, STRENGTH_MAX) -} - // ----- the clock ----------------------------------------------------------------------- /// Both clocks. Time runs for the side to move from the moment its opponent moved; a @@ -648,8 +643,6 @@ mod tests { } } } - assert_eq!(strength_like(1350), 1400); - assert_eq!(strength_like(300), 600); } } @@ -1001,31 +994,7 @@ impl Dialog { .weak() .size(11.5), ); - // Relative to the user's rating; without one, a line saying so instead. let rating = self.rating(); - match rating { - Some(r) => { - ui.horizontal(|ui| { - for (label, delta) in [(tr("Weaker"), -200), (tr("As me"), 0), (tr("Stronger"), 200)] { - let target = strength_like((r as i32 + delta).max(0) as u32); - if choice(ui, target == self.prefs.strength, label, [(W - 2.0 * GAP) / 3.0, TILE_H]) - .clicked() - { - self.prefs.strength = target; - } - } - }); - } - None => { - ui.allocate_ui_with_layout( - egui::vec2(W, TILE_H), - egui::Layout::left_to_right(egui::Align::Center), - |ui| { - ui.label(RichText::new(tr("Enter your rating: Weaker · As me · Stronger will choose for you")).weak()); - }, - ); - } - } // Colour. section(ui, tr("Your colour"));