From 191585eb38518d0b35e8f60bcdee49a4962ca257 Mon Sep 17 00:00:00 2001 From: Crystal Date: Thu, 15 Feb 2024 00:09:19 +0100 Subject: Add stuff --- blog/c/game.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'blog') diff --git a/blog/c/game.html b/blog/c/game.html index ac14ee3..6543e5a 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,17 +23,17 @@

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 :

-
+
+

The code :

+
  1: #include <stdio.h>
   2: #include <stdlib.h>
@@ -234,7 +234,6 @@ 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");
@@ -289,7 +288,7 @@ What this achieves is the “teleportation effect” whenever you are at
 

Author: Crystal

-

Created: 2024-02-15 Thu 00:02

+

Created: 2024-02-15 Thu 00:09

-- cgit 1.4.1-2-gfad0