This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main () | |
| { | |
| int x, y; | |
| printf("Digite um numero: "); | |
| scanf("%i", &x); | |
| printf("Digite mais um numero: "); | |
| scanf("%i", &y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <time.h> | |
| #include "forca.h" | |
| char palavrasecreta[TAMANHO_PALAVRA]; | |
| char chutes[26]; | |
| int chutesdados = 0; |