updates to elimate unused variables and enhance readme
This commit is contained in:
@@ -71,8 +71,6 @@ Housearray *inithousearray(void){
|
||||
void movenorth(Housearray* f, char direction){
|
||||
int old_rows = f->rows·in·array;
|
||||
int old_cols = f-> columns·in·array;
|
||||
int old_original_x = f->x_coord_origin;
|
||||
int old_original_y = f->y_coord_origin;
|
||||
//update y coordinate
|
||||
f->y·coord--;
|
||||
//check if expansion needed
|
||||
@@ -80,7 +78,7 @@ void movenorth(Housearray* f, char direction){
|
||||
//Expand north
|
||||
int new_rows = old_rows +1;
|
||||
int new_cols = old_cols;
|
||||
//creates am array of pointers to point to my rows of integers
|
||||
//creates an array of pointers to point to my rows of integers
|
||||
int** new_grid = (int**)malloc(new_rows * sizeof(int*));
|
||||
if (new_grid == NULL){
|
||||
return;
|
||||
@@ -105,8 +103,6 @@ void movenorth(Housearray* f, char direction){
|
||||
void movesouth(Housearray* f, char direction){
|
||||
int old_rows = f->rows·in·array;
|
||||
int old_cols = f-> columns·in·array;
|
||||
int old_original_x = f->x_coord_origin;
|
||||
int old_original_y = f->y_coord_origin;
|
||||
//update y coordinate
|
||||
f->y·coord++;
|
||||
//check if expansion needed
|
||||
@@ -139,7 +135,7 @@ int main(){
|
||||
fprintf(stderr, "ERROR:initialisation of struct failed\n");
|
||||
return 1;
|
||||
}
|
||||
char c;
|
||||
// char c;
|
||||
char up = '^';
|
||||
char down = 'v';
|
||||
char left = '<';
|
||||
|
Reference in New Issue
Block a user