Commit 0c9d8025 authored by Jakub Čirip's avatar Jakub Čirip
Browse files

Update k.c

parent 3f4b5f0c
......@@ -21,7 +21,7 @@ void add_random_tile(struct game *game){
bool is_game_won(const struct game game){
{
char win;
int win;
for(int i=0; i<4; i++){
for(j=0; j<4; j++){
......@@ -46,7 +46,7 @@ bool update(struct game *game, int dy, int dx){
char word[] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K'};
int num[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048};
int chang=0, a=0,
int chang=1, a=0,
if(dy==1 && dx==0)
{
......@@ -107,7 +107,7 @@ if(dy==1 && dx==0)
}
}else if(dy==0 && dx==1)
{
//V PRAVO
chang=0;
for(int i=0; i<4; i++){
for(int j=3; 0<j; j--)
......@@ -246,7 +246,7 @@ if(dy==1 && dx==0)
{
game->board[i][v]=game->board[i][v+1];
game->board[i][v+1]=' ';
chang++;
chang;
}
}
}
......@@ -348,5 +348,5 @@ int num[] = {2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048};
}
b++;
}
return 0;
return 1;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment