-
Notifications
You must be signed in to change notification settings - Fork 0
/
nettrap.c
executable file
·58 lines (56 loc) · 1.37 KB
/
nettrap.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include "zio.h"
#include "addr/shop.c"
#include "addr/sell.c"
void bridge(int, char**);
void bridge(int money, char **inventory)
{
printf("Area: Bridge\n");
char adr[512];
for (;;)
{
sgets(adr, 511);
if (strcmp(adr, "exit") == 0)
{
printf("Thanks for playing nettrap! Hope you like it!\n");
break;
}
if (strcmp(adr, "shop") == 0)
shop(money, inventory);
else if (strcmp(adr, "sell") == 0)
{
sell(money, inventory);
}
else if (strcmp(adr, "list") == 0)
printf("shop, exit, list\n");
printf("Last input:%s\n", adr);
}
}
int main(void)
{
printf("\t\tStory\n\
\n\n\
It was a typical day, you opened browser,\watched some\n\
videos, but then, everything dissapeared and you were sucked\n\
into computer. You opened your eyes and saw, that you're in the WWW\n\
");
sleep(7);
system("clear");
int money = 75;
char **inventory;
for (int i = 0; i < 64; i++)
{
for (int j = 0; j < 64; j++)
inventory = '\0';
}
printf("\
nettrap Copyright (C) 2024 AnatoliyL\n\
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n\
This is free software, and you are welcome to redistribute it\n\
under certain conditions; type `show c' for details.\n");
bridge(money, inventory);
return 0;
}