wm: glendy

Download patch

ref: 9d0b0ac4749dbbcf45a7281ef50865b34367abc1
parent: e15119e7c8eac4375991c9819868ca32a6f17f3b
author: mkf <mkf@cloud9p.org>
date: Sat May 11 17:17:45 EDT 2024

srv: fancy effects, printf→print

--- a/srv.c
+++ b/srv.c
@@ -119,20 +119,21 @@
 drawlevel(void)
 {
 	/* prints first row, this assumes SzX = SzY, is there a better way? */
-	printf("T%2d|", turn);
+	print("T%2d|", turn);
 	for(int i = 0 ; i < SzX ; i++)
-		printf("%2d |", i);
+		print("%2d |", i);
 
-	printf("\n");
+	print("\n");
 
 	for(int x = 0; x < SzX; x++)
 	{
 		for(int i = 0 ; i < SzY+1 ; i++)
-			printf("----");
-		printf("\n");
+			print("----");
+		print(x % 2 ? "\\" : "/");
+		print("\n");
 
 		/* show column number and have a zig-zag effect */
-		printf("%2d%s |", x, x % 2 ? "  " : "");
+		print("%2d%s |", x, x % 2 ? "  " : "");
 
 		for(int y = 0; y < SzY; y++)
 		{
@@ -140,18 +141,18 @@
 			switch(grid[y][x])
 			{
 				case Wall: 
-					printf(" * |");
+					print(" * |");
 					break;
 				case Glenda:
 					/* fancy effect for glenda's face */
-					printf(" g |");
+					print(" g |");
 					break;
 				default:
-					printf("   |");
+					print("   |");
 					break;
 			}
 		}
-		printf("\n");
+		print("\n");
 	}
 }