feat: Game Struct started and tests on the way

This commit is contained in:
LinlyBoi
2023-04-29 14:10:18 +03:00
parent 24a44c0c3a
commit e28a915d47
2 changed files with 21 additions and 0 deletions

21
src/gamedata/mod.rs Normal file
View File

@@ -0,0 +1,21 @@
#[cfg(test)]
mod tests;
pub struct Board {
p1_score: i32,
p2_score: i32,
columns: Vec<Vec<i32>>,
}
impl Default for Board {
fn default() -> Self {
let mut columns = Vec::with_capacity(6);
for _num in 0..7 {
columns.push(Vec::with_capacity(7))
}
Self {
p1_score: 0,
p2_score: 0,
columns,
}
}
}