From 881ff00e4140350fa74fa256733fdcdf92ef94c4 Mon Sep 17 00:00:00 2001 From: Crystal Date: Wed, 14 Feb 2024 23:56:29 +0100 Subject: Add stuff --- blog/c/game.html | 403 ++++++++++++++++++++++++------------------------ index.html | 84 +++++----- src/org/blog/c/game.org | 28 ++-- src/org/index.org | 2 +- 4 files changed, 255 insertions(+), 262 deletions(-) diff --git a/blog/c/game.html b/blog/c/game.html index 3525321..18e530c 100644 --- a/blog/c/game.html +++ b/blog/c/game.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + The loneliness Game @@ -23,164 +23,161 @@

Hello !!, I hope you are doing great you amazing person whoever you are, and I really appreciate you reading my little C programming adventure. Soo basically I wanted to blog about a little game I made when bored, and figured out it would be a great way to optimize it, and learn new stuff too by documenting the process!

-
-

The concept :

-
+
+

The concept :

+

Basically the player is faced with a NxM field made up with the sign “-” and the player is denoted by the symbol “+”, there are also Bonuses “B” which add 1 to your score, Traps “T”, that remove one from your score, and Dead “D” which resets the score to 0. I will go into more of the specifics later but for now this is how it works, and the controls are Basic WASD bindings, though i may go for a HJKL style later.

-
-

The code :

-
-
-
  1: #include <stdio.h>
-  2: #include <stdlib.h>
-  3: int main(int argc, char *argv[]) {
-  4:     char input,map[5][5] = {
-  5:         {'-', '-', '-', '-', '-'},
-  6:         {'-', '-', '-', '-', '-'},
-  7:         {'-', '-', '-', '-', '-'},
-  8:         {'-', '-', '-', '-', '-'},
-  9:         {'-', '-', '-', '-', '-'}
- 10:     };
- 11:     int stop=0,i=0,moves=0,score=0,pos[2] = {2, 2};
- 12:     int bonus[2];
- 13:     int trap[2] ;
- 14:     int death[2];
- 15:     map[pos[0]][pos[1]] = '+';
- 16:     do{
- 17:     bonus[0] = arc4random_uniform(5); bonus[1] = arc4random_uniform(5);
- 18:     trap[0] = arc4random_uniform(5); trap[1] = arc4random_uniform(5);
- 19:     death[0] = arc4random_uniform(5); death[1] = arc4random_uniform(5);
- 20:     }while((bonus[0] == trap[0] && bonus[1] == trap[1]) || (bonus[0] == death[0] && bonus[1] == death[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (bonus[0] == pos[0] && bonus[1] == pos[1]) || (trap[0] == pos[0] && trap[1] == pos[1]) || (death[0] == pos[0] && death[1] == pos[1]));
- 21:     map[bonus[0]][bonus[1]] = 'B';
- 22:     map[trap[0]][trap[1]] = 'T';
- 23:     map[death[0]][death[1]] = 'D';
- 24:     do{
- 25:     printf("Map:\n");
- 26:     for (int i = 0; i < 5; i++) {
- 27:         for (int j = 0; j < 5; j++) {
- 28:             printf("%c ", map[i][j]);
- 29:         }
- 30:         printf("\n");
- 31:     }
- 32:     printf("Score: %d\n", score);
- 33:     printf("Moves: %d\n", moves);
- 34:     printf("Enter a direction (w,a,s,d) or c to quit: ");
- 35:     scanf(" %c", &input);
- 36: // pos[0] updown pos[1] lr
- 37:     if (input == 'w') {
- 38:         printf("Moving up\n");
- 39:         map[pos[0]][pos[1]] = '-';
- 40:         if (pos[0] == 0) {
- 41:             pos[0] = 4;
- 42:         }
- 43:         else {
- 44:             pos[0]--;
- 45:         }
- 46:     } else if (input == 'a') {
- 47:         printf("Moving left\n");
- 48:         map[pos[0]][pos[1]] = '-';
- 49:         if (pos[1] == 0) {
- 50:             pos[1] = 4;
- 51:         }
- 52:         else {
- 53:             pos[1]--;
- 54:         }
- 55:     } else if (input == 's') {
- 56: 
- 57:         printf("Moving down\n");
- 58:         map[pos[0]][pos[1]] = '-';
- 59:         if (pos[0] == 4) {
- 60:             pos[0] = 0;
- 61:         }
- 62:         else {
- 63:             pos[0]++;
- 64:         }
- 65:     } else if (input == 'd') {
- 66:         printf("Moving right\n");
- 67:         map[pos[0]][pos[1]] = '-';
- 68:         if (pos[1] == 4) {
- 69:             pos[1] = 0;
- 70:         }
- 71:         else {
- 72:             pos[1]++;
- 73:         }
- 74:     } else if (input == 'c') {
- 75:         printf("Quitting\n");
- 76:     } else {
- 77:         printf("Invalid input\n");
- 78:     }
- 79:     map[pos[0]][pos[1]] = '+';
- 80:     if (pos[0] == bonus[0] && pos[1] == bonus[1]) {
- 81:         score++;
- 82:         do{
- 83:         bonus[0]= arc4random_uniform(5);
- 84:         bonus[1]= arc4random_uniform(5);
- 85:         }while((bonus[0] == trap[0] && bonus[1] == trap[1]) || (bonus[0] == death[0] && bonus[1] == death[1]) || (bonus[0] == pos[0] && bonus[1] == pos[1]));
- 86:     }
- 87:     if (pos[0] == trap[0] && pos[1] == trap[1]) {
- 88:         score--;
- 89:         do{
- 90:         trap[0]= arc4random_uniform(5);
- 91:         trap[1]= arc4random_uniform(5);
- 92:         }while((trap[0] == bonus[0] && trap[1] == bonus[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (trap[0] == pos[0] && trap[1] == pos[1]));
- 93:         }
- 94:     if (pos[0] == death[0] && pos[1] == death[1]) {
- 95:         score = 0;
- 96:         do{
- 97:         death[0]= arc4random_uniform(5);
- 98:         death[1]= arc4random_uniform(5);
- 99:         }while((death[0] == bonus[0] && death[1] == bonus[1]) || (death[0] == trap[0] && death[1] == trap[1]) || (death[0] == pos[0] && death[1] == pos[1]));
-100:     }
-101:     if (score % 3 == 0 && score != 0 && stop == 0) {
-102:         map[death[0]][death[1]] = '-';
-103:         do{
-104:         death[0]= arc4random_uniform(5);
-105:         death[1]= arc4random_uniform(5);
-106:         }while((death[0] == bonus[0] && death[1] == bonus[1]) || (death[0] == trap[0] && death[1] == trap[1]) || (death[0] == pos[0] && death[1] == pos[1]));
-107:         stop = 1;
-108:     }
-109:     else if (score % 3 != 0) {
-110:     stop = 0;
-111:     }
-112:     if (moves % 5 == 0 && moves != 0) {
-113:         do{
-114:             map[trap[0]][trap[1]] = '-';
-115:         trap[0]= arc4random_uniform(5);
-116:         trap[1]= arc4random_uniform(5);
-117:         }while((trap[0] == bonus[0] && trap[1] == bonus[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (trap[0] == pos[0] && trap[1] == pos[1]));
-118: 
-119:     }
-120:     map[bonus[0]][bonus[1]] = 'B';
-121:     map[trap[0]][trap[1]] = 'T';
-122:     map[death[0]][death[1]] = 'D';
-123:     moves++;
-124:     }while(input != 'c');
-125:     return 0;
-126: }
-127: 
+
+

The code :

+
+
+#include <stdio.h>
+#include <stdlib.h>
+int main(int argc, char *argv[]) {
+    char input,map[5][5] = {
+        {'-', '-', '-', '-', '-'},
+        {'-', '-', '-', '-', '-'},
+        {'-', '-', '-', '-', '-'},
+        {'-', '-', '-', '-', '-'},
+        {'-', '-', '-', '-', '-'}
+    };
+    int stop=0,i=0,moves=0,score=0,pos[2] = {2, 2};
+    int bonus[2];
+    int trap[2] ;
+    int death[2];
+    map[pos[0]][pos[1]] = '+';
+    do{
+    bonus[0] = arc4random_uniform(5); bonus[1] = arc4random_uniform(5);
+    trap[0] = arc4random_uniform(5); trap[1] = arc4random_uniform(5);
+    death[0] = arc4random_uniform(5); death[1] = arc4random_uniform(5);
+    }while((bonus[0] == trap[0] && bonus[1] == trap[1]) || (bonus[0] == death[0] && bonus[1] == death[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (bonus[0] == pos[0] && bonus[1] == pos[1]) || (trap[0] == pos[0] && trap[1] == pos[1]) || (death[0] == pos[0] && death[1] == pos[1]));
+    map[bonus[0]][bonus[1]] = 'B';
+    map[trap[0]][trap[1]] = 'T';
+    map[death[0]][death[1]] = 'D';
+    do{
+    printf("Map:\n");
+    for (int i = 0; i < 5; i++) {
+        for (int j = 0; j < 5; j++) {
+            printf("%c ", map[i][j]);
+        }
+        printf("\n");
+    }
+    printf("Score: %d\n", score);
+    printf("Moves: %d\n", moves);
+    printf("Enter a direction (w,a,s,d) or c to quit: ");
+    scanf(" %c", &input);
+// pos[0] updown pos[1] lr
+    if (input == 'w') {
+        printf("Moving up\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[0] == 0) {
+            pos[0] = 4;
+        }
+        else {
+            pos[0]--;
+        }
+    } else if (input == 'a') {
+        printf("Moving left\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[1] == 0) {
+            pos[1] = 4;
+        }
+        else {
+            pos[1]--;
+        }
+    } else if (input == 's') {
+
+        printf("Moving down\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[0] == 4) {
+            pos[0] = 0;
+        }
+        else {
+            pos[0]++;
+        }
+    } else if (input == 'd') {
+        printf("Moving right\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[1] == 4) {
+            pos[1] = 0;
+        }
+        else {
+            pos[1]++;
+        }
+    } else if (input == 'c') {
+        printf("Quitting\n");
+    } else {
+        printf("Invalid input\n");
+    }
+    map[pos[0]][pos[1]] = '+';
+    if (pos[0] == bonus[0] && pos[1] == bonus[1]) {
+        score++;
+        do{
+        bonus[0]= arc4random_uniform(5);
+        bonus[1]= arc4random_uniform(5);
+        }while((bonus[0] == trap[0] && bonus[1] == trap[1]) || (bonus[0] == death[0] && bonus[1] == death[1]) || (bonus[0] == pos[0] && bonus[1] == pos[1]));
+    }
+    if (pos[0] == trap[0] && pos[1] == trap[1]) {
+        score--;
+        do{
+        trap[0]= arc4random_uniform(5);
+        trap[1]= arc4random_uniform(5);
+        }while((trap[0] == bonus[0] && trap[1] == bonus[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (trap[0] == pos[0] && trap[1] == pos[1]));
+        }
+    if (pos[0] == death[0] && pos[1] == death[1]) {
+        score = 0;
+        do{
+        death[0]= arc4random_uniform(5);
+        death[1]= arc4random_uniform(5);
+        }while((death[0] == bonus[0] && death[1] == bonus[1]) || (death[0] == trap[0] && death[1] == trap[1]) || (death[0] == pos[0] && death[1] == pos[1]));
+    }
+    if (score % 3 == 0 && score != 0 && stop == 0) {
+        map[death[0]][death[1]] = '-';
+        do{
+        death[0]= arc4random_uniform(5);
+        death[1]= arc4random_uniform(5);
+        }while((death[0] == bonus[0] && death[1] == bonus[1]) || (death[0] == trap[0] && death[1] == trap[1]) || (death[0] == pos[0] && death[1] == pos[1]));
+        stop = 1;
+    }
+    else if (score % 3 != 0) {
+    stop = 0;
+    }
+    if (moves % 5 == 0 && moves != 0) {
+        do{
+            map[trap[0]][trap[1]] = '-';
+        trap[0]= arc4random_uniform(5);
+        trap[1]= arc4random_uniform(5);
+        }while((trap[0] == bonus[0] && trap[1] == bonus[1]) || (trap[0] == death[0] && trap[1] == death[1]) || (trap[0] == pos[0] && trap[1] == pos[1]));
+
+    }
+    map[bonus[0]][bonus[1]] = 'B';
+    map[trap[0]][trap[1]] = 'T';
+    map[death[0]][death[1]] = 'D';
+    moves++;
+    }while(input != 'c');
+    return 0;
+}
+
 
-

Let’s go step by step and see what we can fix or improve, to start off, line 4 to 10 can be reduced to a single line (which will be beneficial later too)

-
-
4: char input,map[5][5] = {'-'};
+
+char input,map[5][5] = {'-'};
 
-

Much better…but can be even more better, why stop at 5 when we can give the choice to the user !!

-
-
4: int n=5,m=5;
-5: char input,map[n][m]={'-'};
+
+int n=5,m=5;
+char input,map[n][m]={'-'};
 
-

For now at least, n and m are hardcoded to 5, but this will change later. @@ -189,10 +186,9 @@ For now at least, n and m are hardcoded to 5, but this will change later.

Of course we have the usual inits on line 11, though since we are using variables instead of hardcoding 5, we will have to find the center by ourselves

-
-
11:     int stop=0,i=0,moves=0,score=0,pos[2] = {n/2,m/2};
+
+    int stop=0,i=0,moves=0,score=0,pos[2] = {n/2,m/2};
 
-

This is getting better, of course we then initialize the coordinates of bonus, trap, and death, and set the player as a ’+’ in the field. @@ -202,12 +198,11 @@ This is getting better, of course we then initialize the coordinates of bonus, t

Here comes the line 17-21, where it generates a random coordinate for the aforementioned pickups, and do that until there is no conflict between eachother and the player) here we will need to change it a tiny bit.

-
-
17:     bonus[0] = arc4random_uniform(n); bonus[1] = arc4random_uniform(m);
-18:     trap[0] = arc4random_uniform(n); trap[1] = arc4random_uniform(m);
-19:     death[0] = arc4random_uniform(n); death[1] = arc4random_uniform(m);
+
+    bonus[0] = arc4random_uniform(n); bonus[1] = arc4random_uniform(m);
+    trap[0] = arc4random_uniform(n); trap[1] = arc4random_uniform(m);
+    death[0] = arc4random_uniform(n); death[1] = arc4random_uniform(m);
 
-

Looking good so far!!, We then have line 21-23 which also shows the pickups as their respective symbols in the map. @@ -217,16 +212,15 @@ Looking good so far!!, We then have line 21-23 which also shows the pickups as t

The main interactive program starts here, which will learn at least one time and stop if the received input is a ’c’, it starts with a nested for loop on line 26 up to 31 to show the content of the map, nothing fancy, just some matrix stuff. we need to change the 5 though!

-
-
26:   for (int i = 0; i < n; i++) {
-27:         for (int j = 0; j < m; j++) {
-28:             printf("%c ", map[i][j]);
-29:         }
-30:         printf("\n");
-31:     }
-32: 
+
+  for (int i = 0; i < n; i++) {
+        for (int j = 0; j < m; j++) {
+            printf("%c ", map[i][j]);
+        }
+        printf("\n");
+    }
+
 
-

We show the score and the moves too, which at the start of the game are set to 0. and we prompt the user for a direction. Note here the space before the %c, this basically allows for the program to not choke on newlines and also even if the user writes multiple keys at the same time, they will still be done, like ww will make the player move twice up.

@@ -234,51 +228,50 @@ We show the score and the moves too, which at the start of the game are set to 0

After that we have some logic which should also be changed to account for the n and m changes yet again

-
-
37:     if (input == 'w') {
-38:         printf("Moving up\n");
-39:         map[pos[0]][pos[1]] = '-';
-40:         if (pos[0] == 0) {
-41:             pos[0] = n-1;
-42:         }
-43:         else {
-44:             pos[0]--;
-45:         }
-46:     } else if (input == 'a') {
-47:         printf("Moving left\n");
-48:         map[pos[0]][pos[1]] = '-';
-49:         if (pos[1] == 0) {
-50:             pos[1] = m-1;
-51:         }
-52:         else {
-53:             pos[1]--;
-54:         }
-55:     } else if (input == 's') {
-56: 
-57:         printf("Moving down\n");
-58:         map[pos[0]][pos[1]] = '-';
-59:         if (pos[0] == n-1) {
-60:             pos[0] = 0;
-61:         }
-62:         else {
-63:             pos[0]++;
-64:         }
-65:     } else if (input == 'd') {
-66:         printf("Moving right\n");
-67:         map[pos[0]][pos[1]] = '-';
-68:         if (pos[1] == m-1) {
-69:             pos[1] = 0;
-70:         }
-71:         else {
-72:             pos[1]++;
-73:         }
-74:     } else if (input == 'c') {
-75:         printf("Quitting\n");
-76:     } else {
-77:         printf("Invalid input\n");
-78:     }
+
+    if (input == 'w') {
+        printf("Moving up\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[0] == 0) {
+            pos[0] = n-1;
+        }
+        else {
+            pos[0]--;
+        }
+    } else if (input == 'a') {
+        printf("Moving left\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[1] == 0) {
+            pos[1] = m-1;
+        }
+        else {
+            pos[1]--;
+        }
+    } else if (input == 's') {
+
+        printf("Moving down\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[0] == n-1) {
+            pos[0] = 0;
+        }
+        else {
+            pos[0]++;
+        }
+    } else if (input == 'd') {
+        printf("Moving right\n");
+        map[pos[0]][pos[1]] = '-';
+        if (pos[1] == m-1) {
+            pos[1] = 0;
+        }
+        else {
+            pos[1]++;
+        }
+    } else if (input == 'c') {
+        printf("Quitting\n");
+    } else {
+        printf("Invalid input\n");
+    }
 
-

What this achieves is the “teleportation effect” whenever you are at the border of the screen! @@ -288,7 +281,7 @@ What this achieves is the “teleportation effect” whenever you are at

Author: Crystal

-

Created: 2024-02-14 Wed 23:43

+

Created: 2024-02-14 Wed 23:56

diff --git a/index.html b/index.html index 56309cd..f015aa2 100755 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Crystal's Website 💜 @@ -16,9 +16,9 @@

Crystal’s Website 💜

-
-

Welcome to the wired

-
+
+

Welcome to the wired

+

Hi there, adorable you!

@@ -29,41 +29,41 @@ And welcome to my little corner of the internet, here I will be posting my rando -
+

Lain_chibi.png

-
-

Articles ( NEW !!!! )

-
+
+

Articles ( NEW !!!! )

+
-
-

Blogs ( NEWER !!!! )

-
+
+

Blogs ( NEWER !!!! )

+
-
-

C programming :

-
+
+

C programming :

+
-
-

root@localhost $ whoami

-
+
+

root@localhost $ whoami

+
-
-

About me :

-
+
+

About me :

+
  • Name : Crystal
  • Age : 18 years old
  • @@ -82,9 +82,9 @@ If you want to contact me (which would be really surprising) contact me via
-
-

About my Navi :

-
+ -
-

Sign my Guestbook (External website warning)

-
+
+

Sign my Guestbook (External website warning)

+

Want to leave a message, opinion, review or a salty insult ? Be sure to Sign my Guestbook then, it takes two seconds but it will mean the world to me !!!

-
+

sign_my_guestbook-anim.gif

-
-

Blinkies

-
+
+

Blinkies

+ -
-

My banner

-
+
+

My banner

+

If you enjoyed my website, you could link me on your personal website using this banner. If you don’t want to, then no pressure 💜 I still love you and I hope that this small shrine of mine will impress you in the future!!!

-
+

crystal-tilde.gif

-
+

lain_crystal_glitch.gif

@@ -181,12 +181,12 @@ If you enjoyed my website, you could link me on your personal website using this
-
-

Close this website, txEn eht nepO.( Webrings , so expect JavaScript on this page)!!

+ -
-

Misc :

-
+
+

Misc :

+
  1. My University notes
@@ -195,7 +195,7 @@ If you enjoyed my website, you could link me on your personal website using this

Author: Crystal

-

Created: 2024-02-14 Wed 23:47

+

Created: 2024-02-14 Wed 23:56

diff --git a/src/org/blog/c/game.org b/src/org/blog/c/game.org index 3ed154e..7e9c49a 100644 --- a/src/org/blog/c/game.org +++ b/src/org/blog/c/game.org @@ -19,7 +19,7 @@ Hello !!, I hope you are doing great you amazing person whoever you are, and I r Basically the player is faced with a NxM field made up with the sign *"-"* and the player is denoted by the symbol *"+"*, there are also Bonuses *"B"* which add 1 to your score, Traps *"T"*, that remove one from your score, and Dead *"D"* which resets the score to 0. I will go into more of the specifics later but for now this is how it works, and the controls are Basic WASD bindings, though i may go for a HJKL style later. ** The code : - #+BEGIN_SRC c -n + #+BEGIN_EXAMPLE #include #include int main(int argc, char *argv[]) { @@ -147,41 +147,41 @@ int main(int argc, char *argv[]) { return 0; } - #+END_SRC + #+END_EXAMPLE Let's go step by step and see what we can fix or improve, to start off, line 4 to 10 can be reduced to a single line (which will be beneficial later too) - #+BEGIN_SRC c -n 4 + #+BEGIN_EXAMPLE char input,map[5][5] = {'-'}; - #+END_SRC + #+END_EXAMPLE Much better...but can be even more better, why stop at 5 when we can give the choice to the user !! - #+BEGIN_SRC c -n 4 + #+BEGIN_EXAMPLE int n=5,m=5; char input,map[n][m]={'-'}; - #+END_SRC + #+END_EXAMPLE For now at least, n and m are hardcoded to 5, but this will change later. Of course we have the usual inits on line 11, though since we are using variables instead of hardcoding 5, we will have to find the center by ourselves - #+BEGIN_SRC c -n 11 + #+BEGIN_EXAMPLE int stop=0,i=0,moves=0,score=0,pos[2] = {n/2,m/2}; - #+END_SRC + #+END_EXAMPLE This is getting better, of course we then initialize the coordinates of bonus, trap, and death, and set the player as a *'+'* in the field. Here comes the line 17-21, where it generates a random coordinate for the aforementioned pickups, and do that until there is no conflict between eachother and the player) here we will need to change it a tiny bit. - #+BEGIN_SRC c -n 17 + #+BEGIN_EXAMPLE bonus[0] = arc4random_uniform(n); bonus[1] = arc4random_uniform(m); trap[0] = arc4random_uniform(n); trap[1] = arc4random_uniform(m); death[0] = arc4random_uniform(n); death[1] = arc4random_uniform(m); - #+END_SRC + #+END_EXAMPLE Looking good so far!!, We then have line 21-23 which also shows the pickups as their respective symbols in the map. The main interactive program starts here, which will learn at least one time and stop if the received input is a *'c'*, it starts with a nested for loop on line 26 up to 31 to show the content of the map, nothing fancy, just some matrix stuff. we need to change the 5 though! - #+BEGIN_SRC c -n 26 + #+BEGIN_EXAMPLE for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { printf("%c ", map[i][j]); @@ -189,11 +189,11 @@ The main interactive program starts here, which will learn at least one time and printf("\n"); } - #+END_SRC + #+END_EXAMPLE We show the score and the moves too, which at the start of the game are set to 0. and we prompt the user for a direction. Note here the space before the %c, this basically allows for the program to not choke on newlines and also even if the user writes multiple keys at the same time, they will still be done, like *ww* will make the player move twice up. After that we have some logic which should also be changed to account for the n and m changes yet again -#+BEGIN_SRC c -n 37 +#+BEGIN_EXAMPLE if (input == 'w') { printf("Moving up\n"); map[pos[0]][pos[1]] = '-'; @@ -236,6 +236,6 @@ After that we have some logic which should also be changed to account for the n } else { printf("Invalid input\n"); } -#+END_SRC +#+END_EXAMPLE What this achieves is the "teleportation effect" whenever you are at the border of the screen! diff --git a/src/org/index.org b/src/org/index.org index 8d13bf0..61c9236 100755 --- a/src/org/index.org +++ b/src/org/index.org @@ -22,7 +22,7 @@ And welcome to my little corner of the internet, here I will be posting my rando - *[[./articles/discord.html][Discord : an internet cancer]]* /Sun Sep 10 15:25:22 2023/ * Blogs ( NEWER !!!! ) ** C programming : -- *[[https://crystal.tilde.institute/blog/c/game.html][The Lonelyness game]]* /Wed Feb 14 23:46:35 2024/ +- *[[https://crystal.tilde.institute/blog/c/game.html][The Loneliness game]]* /Wed Feb 14 23:46:35 2024/ * root@localhost $ whoami ** About me : - Name : *Crystal* -- cgit 1.4.1-2-gfad0