Skip to content

Instantly share code, notes, and snippets.

View mauricioaniche's full-sized avatar

Maurício Aniche mauricioaniche

View GitHub Profile
@mauricioaniche
mauricioaniche / adivinhacao.c
Created January 8, 2015 16:41
Código do jogo de adivinhação (fim do capítulo de tipos e operações)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define NUMERO_DE_TENTATIVAS 3
int main() {
printf("************************************\n");
printf("* Bem vindo ao Jogo de Adivinhação *\n");
printf("************************************\n");
@mauricioaniche
mauricioaniche / forca.c
Created January 19, 2015 21:50
Jogo de Forca - Completo
#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;
@mauricioaniche
mauricioaniche / fogefoge.c
Last active March 15, 2024 19:54
Foge Foge - Versão final
#include <stdio.h>
#include <stdlib.h>
#include "time.h"
#include "fogefoge.h"
#include "mapa.h"
#include "ui.h"
MAPA m;
POSICAO heroi;
int tempilula = 0;
@mauricioaniche
mauricioaniche / fogefoge.c
Created January 26, 2015 20:19
Foge Foge - Matriz - Final
#include <stdio.h>
#include <stdlib.h>
#include "fogefoge.h"
char** mapa;
int linhas;
int colunas;
void lemapa() {
FILE* f;
@mauricioaniche
mauricioaniche / forca.c
Last active November 26, 2023 17:38
Forca - IO - Parte 3
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "forca.h"
char palavrasecreta[20];
char chutes[26];
int chutesdados = 0;
import builtins
input_values = []
print_values = []
def mock_input(s):
print_values.append(s)
return input_values.pop(0)
@mauricioaniche
mauricioaniche / forca.c
Last active September 19, 2023 00:53
Código de Forca - Parte 1
#include <stdio.h>
#include <string.h>
int main() {
char palavrasecreta[20];
sprintf(palavrasecreta, "MELANCIA");
int acertou = 0;
int enforcou = 0;
@mauricioaniche
mauricioaniche / gist:3024328
Created June 30, 2012 15:55
Exercícios utilizados no estudo sobre TDD (SBES2012)
\chapter{Exercícios}
\label{ape:exercicios}
Os exercícios são os mesmos para todos os grupos. O participante, em caso de dúvidas, poderá perguntar ao pesquisador.
\section{Lembrete ao participante}
Caro participante,
Lembre-se que os problemas aqui propostos simulam complicações do mundo real.
@mauricioaniche
mauricioaniche / adivinhacao.c
Last active August 10, 2023 03:15
Código final do jogo de adivinhação
// incluindo as bibliotecas
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// definindo as constantes
#define NUMERO_DE_TENTATIVAS 3
int main() {
@mauricioaniche
mauricioaniche / adivinhacao.c
Created February 13, 2015 19:52
Jogo de Adivinhação - Controle de Fluxo - Final
#include <stdio.h>
int main() {
// imprime cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;