Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
начальное планирование структур данных
- Loading branch information
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/target | ||
Cargo.lock |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,45 @@ | ||
/// День | ||
struct Day(i32); | ||
|
||
/// Итерация изучения слова, сколько ждать с последнего изучения, сколько раз повторить, показывать ли слово во время набора | ||
struct LearnType { | ||
/// Сколько дней ждать с | ||
wait_days: i8, | ||
count: i8, | ||
show_word: bool, | ||
} | ||
|
||
/// Статистика написаний для слова, дня или вообще | ||
struct TypingStats { | ||
typed: i32, | ||
right: i32, | ||
wrong: i32, | ||
} | ||
|
||
/// Обозначает одну пару слов рус-англ или англ-рус в статистике | ||
enum WordStatus { | ||
/// Мы знали это слово раньше, его изучать не надо | ||
KnowPreviously, | ||
|
||
/// Мы изучаем это слово | ||
ToLearn { | ||
/// Когда это слово в последний раз изучали | ||
last_learn: Day, | ||
|
||
/// Количество изучений слова | ||
learns: Vec<LearnType>, | ||
|
||
/// Статистика | ||
stats: TypingStats, | ||
}, | ||
|
||
/// Мы знаем это слово | ||
Learned { | ||
/// Статистика | ||
stats: TypingStats, | ||
}, | ||
} | ||
|
||
fn main() { | ||
println!("Hello, world!"); | ||
} |