Projekt/snake_main.c
void add_square(int x, int y, int size){
  //max size is 32 (our max y value)

  //set all pixels with x values between x and x+size-1 and y values between y and y-size+1 to 1
  int i,j;
  for(i = x; i <= x + size -1; i++){
    for(j = y-size + 1; j <= y; j++){
      bool* pixel_pointer = pixel_to_frame_buffer_position(i,j);
      *pixel_pointer = true;

    }
  }
}
/*x,y mark starting points of the square (lower left hand corner)*/
x,y mark starting points of the square (lower left hand corner)
x y mark starting points of the square ( lower left hand corner )
void add_square(int x, int y, int size){
  int i,j;
  for(i = x; i <= x + size -1; i++){
    for(j = y-size + 1; j <= y; j++){
      bool* pixel_pointer = pixel_to_frame_buffer_position(i,j);
      *pixel_pointer = true;
    }
  }
}
void add_square ( int x , int y , int size ) { int i , j ; for ( i = x ; i <= x + size - 1 ; i ++ ) { for ( j = y - size + 1 ; j <= y ; j ++ ) { bool * pixel_pointer = pixel_to_frame_buffer_position ( i , j ) ; * pixel_pointer = true ; } } }
x,y mark starting points of the square (lower left hand corner)
x y mark starting points of the square ( lower left hand corner )
//max size is 32 (our max y value) //set all pixels with x values between x and x+size-1 and y values between y and y-size+1 to 1