70 lines
1.8 KiB
Rust
70 lines
1.8 KiB
Rust
use crate::{Avatar, Position};
|
|
use crate::image::Image;
|
|
|
|
pub mod image {
|
|
use crate::image::Image;
|
|
|
|
pub(crate) fn chequers_1() -> Image {
|
|
Image {
|
|
pixels: vec![
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
1, 0, 1, 0, 1, 0, 1, 0,
|
|
0, 1, 0, 1, 0, 1, 0, 1,
|
|
]
|
|
}
|
|
}
|
|
|
|
pub fn chequers_2() -> Image {
|
|
Image {
|
|
pixels: vec![
|
|
0,1,0,1,0,1,0,1,
|
|
1,0,1,0,1,0,1,0,
|
|
0,1,0,1,0,1,0,1,
|
|
1,0,1,0,1,0,1,0,
|
|
0,1,0,1,0,1,0,1,
|
|
1,0,1,0,1,0,1,0,
|
|
0,1,0,1,0,1,0,1,
|
|
1,0,1,0,1,0,1,0,
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
pub fn avatar() -> Avatar {
|
|
Avatar {
|
|
animation_frames: vec![
|
|
Image {
|
|
pixels: vec![
|
|
0,0,0,0,0,0,0,0,
|
|
0,0,1,1,1,1,0,0,
|
|
0,1,1,1,1,1,1,0,
|
|
1,1,1,0,1,1,1,0,
|
|
1,0,0,1,1,0,0,1,
|
|
1,1,1,1,1,1,1,1,
|
|
1,1,1,1,1,1,1,1,
|
|
0,1,1,1,1,1,1,0,
|
|
]
|
|
},
|
|
Image {
|
|
pixels: vec![
|
|
0,0,0,0,0,0,0,0,
|
|
0,0,0,0,0,0,0,0,
|
|
0,0,1,1,1,1,0,0,
|
|
0,1,1,1,1,1,1,0,
|
|
1,1,1,0,1,1,1,0,
|
|
1,0,0,1,1,0,0,1,
|
|
1,1,1,1,1,1,1,1,
|
|
0,1,1,1,0,1,1,0,
|
|
]
|
|
},
|
|
],
|
|
room: "0".to_string(),
|
|
position: Position { x: 2, y: 5 }
|
|
}
|
|
}
|