(serialdev: &str, game: Game, param: Option<GameOfLifeStartParam>)
| 379 | } |
| 380 | |
| 381 | fn start_game_cmd(serialdev: &str, game: Game, param: Option<GameOfLifeStartParam>) { |
| 382 | match (game, param) { |
| 383 | (Game::GameOfLife, Some(param)) => { |
| 384 | simple_cmd(serialdev, Command::StartGame, &[game as u8, param as u8]) |
| 385 | } |
| 386 | (Game::GameOfLife, None) => { |
| 387 | println!("To start Game of Life, provide a --game-param"); |
| 388 | } |
| 389 | (_, _) => simple_cmd(serialdev, Command::StartGame, &[game as u8]), |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | fn simple_cmd_multiple(serialdevs: &Vec<String>, command: Command, args: &[u8]) { |
| 394 | for serialdev in serialdevs { |
no test coverage detected