all stats

Photon_Niko's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #21

submitted at
2 likes

guesses
comments 0

post a comment


entry.rs ASCII text, with CRLF line terminators
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
fn entry(grid: Vec<bool>, width: usize, _height: usize, x: usize, y: usize) -> Vec<bool>{
    struct Pos {
        x: usize,
        y: usize
    }

    fn get_at(grid: &Vec<bool>, width:usize, pos: &Pos) -> bool {
        return grid[pos.y*width+pos.x]
    }
    
    fn get_neighbours(grid: &Vec<bool>, width:usize, height:usize, pos:&Pos) -> Vec<Pos> {
        let mut potential_neighbors: Vec<Pos> = Vec::new();
        
        if pos.x>0 {
            potential_neighbors.push(Pos{x:pos.x-1, y:pos.y})
        }
        if pos.x<width-1 {
            potential_neighbors.push(Pos{x:pos.x+1, y:pos.y})
        }
        if pos.y>0 {
            potential_neighbors.push(Pos{x:pos.x, y:pos.y-1})
        }
        if pos.y<height-1 {
            potential_neighbors.push(Pos{x:pos.x, y:pos.y+1})
        }
        
        let mut yes_neighbours: Vec<Pos> = Vec::new();
        for neighbor in potential_neighbors {
            if ! get_at(grid, width, &neighbor) {
                yes_neighbours.push(neighbor)
            }
        }

        return yes_neighbours
    }
    
    let pos = Pos{x:x, y:y};

    let mut staccc:Vec<Pos> = Vec::new();
    
    let mut new_grid = grid.clone();
    if !get_at(&grid, width, &pos) {
        staccc.push(pos);

        while !staccc.is_empty() {
            let nex = staccc.pop().unwrap();
            new_grid[nex.y*width + nex.x] = true;
            
            let neis = get_neighbours(&new_grid, width, _height, &nex);

            for nei in neis {
                staccc.push(nei)
            }
        }
    }

    return new_grid
}

round #18

submitted at
2 likes

guesses
comments 0

post a comment


ffibbonnacci.length ASCII text, with CRLF line terminators
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
9 8 7 I'm feelin blue.765

I'm feeling you. 4thirty2
i

wondr if the
feeling's true.  9 8 7 what
shall i do
????????????
I'm scaared and
confused. there's numbers
inTheMusic
can u feel it...
too???????????
hmmm