Testing something, please ignore

Don’t mind me, just seeing how well this handles code snippets:

    fn redraw(&self) -> Vec<Sprite> {
        let map: VecGrid<char> = VecGrid::from(vec![
            "..........",
            "..######..",
            "..#....#..",
            "..#..###..",
            "..####.#..",
            "...#...#..",
            "...#...#..",
            "...#####..",
            "..........",
            "..........",
        ].join("\n").as_str());

        let dc = DrawingContext::new((320.0, 256.0));
        let mut sprites = vec![];
        for (n, ch) in map.iter().enumerate() {
            let c = map.coord(n);
            let spr = match ch {
                '.' => Sprite::new((144, 128), (16, 16)),
                '#' => {
                    wall_tile(map.neighbors_equal(c, '#'))
                },
                _ => Sprite::new((80, 16), (16, 16))
            };
            sprites.push(dc.place(spr, (c.x as f32 * 16.0, c.y as f32 * 16.0)))
        }
        sprites
    }
6 Likes

Wow a+ 5 stars #1. Not only did it format it but it seemingly autodetected that it’s Rust. Or at least something similar enough to Rust that the highlighting isn’t total garbage.

edit: I’m dumb, I forgot that I actually told it it was Rust. Still, telling it that it’s Rust works! Woo!

5 Likes

6 Likes
fn main() {println!("Hello Lunduke!")} 
fn main() {println!("Hello Lunduke!")} 

First is without specifying the language and second is specifying the language.

test

test

test

Test

Test

Test

Such and such said a thing, here it is

Test

Wow, that sure was a lot to say for such and such

  • You are Lunduke
  • You are not Lunduke
0 voters


¯\_(ツ)_/¯

4 Likes

This was the big thing that annoyed me about Locals, is that you could blockquote text but it sucked for posting code… which makes sense for Locals since their focus is talking about politics, but imho less so for us since our focus is general nerdery.

4 Likes

:roll_eyes: That’s like saying “Please Do Not Audit.”
You know what will happen. (Reverse Psychology?)

3 Likes

Nothing To See Here GIFs - Find & Share on GIPHY

4 Likes

Rusty fren, I ignorez your post.

1 Like

I wonder what happens if I do @discobot.

Hi! To find out what I can do, say @discobot display help.

Oh, hey there @discobot.

https://forum.lunduke.com/t/everyone-reply-to-this-post/441/137?u=bigcoder

(I need those badges)

@discobot start advanced tutorial

Aw man, that would have been crazy.

@bionicman08