Skip to content

Commit 134bd87

Browse files
committed
Enhance documentation for MemoryGame struct fields
1 parent 2f6d83f commit 134bd87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/memory_game.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ use std::time::Duration;
1414
/// It provides methods to flip cards, check for matches, and reset the game.
1515
/// The rendering logic uses GPUI's element system to create a responsive and visually appealing game interface.
1616
pub struct MemoryGame {
17+
/// The collection of memory cards in the game.
1718
cards: SmallVec<[MemoryCard; 12]>,
19+
/// Indexes of currently flipped cards.
1820
flipped_indexes: SmallVec<[usize; 12]>,
21+
/// The number of matches found so far.
1922
matches: u8,
23+
/// Flag indicating if the game is currently checking for a match.
2024
is_checking: bool,
2125
}
2226

0 commit comments

Comments
 (0)