Skip to content

Instantly share code, notes, and snippets.

use std::io::{self, Write};
use std::{fmt::Display, str::FromStr};
type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
struct Board {
contents: Vec<Option<char>>,
width: usize,
height: usize,
}
fn main() {
for i in 1..=100 {
match (i % 3, i % 5) {
(0, 0) => println!("CracklePop"),
(0, _) => println!("Crackle"),
(_, 0) => println!("Pop"),
_ => println!("{}", i),
};
}
}
#!/usr/bin/env bash
# tictactoe.sh - tictactoe in bash for fun
#
set -eu
board=" "
turn="X"
print_board() {