# HG changeset patch # User Peter Gervai # Date 1675557756 -3600 # Node ID 91154fe07100860360fdc8d0a2d33b2cd3daee60 # Parent c2b77cc8664c556fdc3cd12d447ce4b93a2b2cc2 Add some test comment, remove original draft comments. diff -r c2b77cc8664c -r 91154fe07100 src/main.rs --- a/src/main.rs Sat Feb 04 22:57:08 2023 +0100 +++ b/src/main.rs Sun Feb 05 01:42:36 2023 +0100 @@ -264,6 +264,9 @@ } } +// Tests. Try `cargo test`. +// They have criminally low coverage, mostly due to the simplicity of the code. +// Take it as some examples. #[cfg(test)] mod tests { use std::collections::VecDeque; @@ -272,6 +275,7 @@ use crate::{card::Card, player::{Player, PlayerCard}, row::Row, table::Table}; #[test] + /// Test Card, and point generation logic. fn card_values() { let card_values = vec![1,2,5,10,33,55,77]; let card_points = vec![1,1,2,3, 5, 7, 5]; @@ -389,28 +393,3 @@ } } -/* - -- 1-104 lap, - - *5 - 2 - - *0 - 3 - - NN - 5 - - 55 - 7 -- deck -- jatekosok; kezben tartott lapok; elvitt lapok; pontszamok; counter: elvitt sorok, okrok, total pont --- keveres (keveresek szama) --- osztas: mindenki 10 lap --- start sorok: 5 kartya -- jatek (jatekok szama) --- mindenki a felso lapot kiteszi --- szamsorrendben felkerulnek, aki viszi, viszi ---- ha kisebb, akkor dontes ----- ha van legkevesebb, viszi ----- ha tobb min van, random valaszt -- osszesites --- okrok, elvitt sorok --- keveresek szama, jatekok szama, eltelt ido -- deck osszegyujtes - - -*/ \ No newline at end of file