Nos meus tempos de faculdade, quando ainda estava no terceiro período, tivemos disciplina de C e após aprendermos o básico ou o suficiente para começarmos a fazer coisas mais interessante, foi nos passado uma tarefa para que criássemos um jogo do campo minado, mas nada sofisticado, o exercício era para o jogador digitar a jogada e seria retornado em forma textual o resultado, algo como: Ainda falta X bombas no lugar tal… O trabalho era para ser feito em dupla, então, eu e o Rogério, resolvermos fazer um joguinho um pouco mais incrementado. Foi um desafio para ambos e muito divertido. Um detalhe, é que eu era o único cara que usava Linux e algumas coisas no código teve que ser modificadas, mas no final tudo deu certo e ganhamos nota máxima.
*Obs.: Coloquei o jogo sobre a licença GPL2, então caso for modificar e ou redistribuir, não esqueça dos créditos e de compartilhar as alterações feitas.
Vejam algumas imagens do jogo rodando no Shell do Linux
Tela de abertura do jogo:
Tela do jogo iniciado:
Tela de fim do jogo:
O arquivo compilado pode ser baixado aqui: cmin
O código fonte pode ser baixado aqui: cmin.c
Para quem quiser testar, basta baixar o cmin e dar permissão de execução:
chomd +x cmin
Depois um ponto+barra (./) para executá-lo:
./cmin
Olá, não estou conseguindo compilar o código, ao tentar compilar dá os seguinte erros:
darkstarfire@darkstar ~/Desktop $ gcc cmin.c -o cmin
cmin.c:70:2: error: unknown type name ‘bool’
bool status;
^
cmin.c: In function ‘inicia_matriz’:
cmin.c:83:24: error: ‘false’ undeclared (first use in this function)
matriz[i][j].status=false; //true=aberto false=fechado
^
cmin.c:83:24: note: each undeclared identifier is reported only once for each function it appears in
cmin.c: In function ‘desenhar’:
cmin.c:281:28: error: ‘true’ undeclared (first use in this function)
if (matriz[i][j].status==true)
^
cmin.c:299:28: error: ‘false’ undeclared (first use in this function)
if (matriz[i][j].status==false)
^
cmin.c: At top level:
cmin.c:329:60: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
int abrindo_zero(tmatriz matriz[tmat][tmat],int i,int j,int& acerto)
^
cmin.c:519:58: error: unknown type name ‘bool’
void escolha_coordenada(tmatriz matriz[tmat][tmat],int x,bool& parada,int& acerto)
^
cmin.c:519:74: error: expected ‘;’, ‘,’ or ‘)’ before ‘&’ token
void escolha_coordenada(tmatriz matriz[tmat][tmat],int x,bool& parada,int& acerto)
^
cmin.c: In function ‘main’:
cmin.c:597:2: error: unknown type name ‘bool’
bool parada,opcao=true;
^
cmin.c:597:20: error: ‘true’ undeclared (first use in this function)
bool parada,opcao=true;
^
cmin.c:661:11: error: ‘false’ undeclared (first use in this function)
parada=false;
^
darkstarfire@darkstar ~/Desktop $
versão do GCC: gcc version 4.8.2 (GCC)
darkstarfire@darkstar ~/Desktop $ gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/4.8.2/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.8.2/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../gcc-4.8.2/configure –prefix=/usr –libdir=/usr/lib64 –mandir=/usr/man –infodir=/usr/info –enable-shared –enable-bootstrap –enable-languages=ada,c,c++,fortran,go,java,lto,objc –enable-threads=posix –enable-checking=release –enable-objc-gc –with-system-zlib –with-python-dir=/lib64/python2.7/site-packages –disable-libunwind-exceptions –enable-__cxa_atexit –enable-libssp –enable-lto –with-gnu-ld –verbose –enable-java-home –with-java-home=/usr/lib64/jvm/jre –with-jvm-root-dir=/usr/lib64/jvm –with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports –with-arch-directory=amd64 –with-antlr-jar=/home/slackware/slackbuilds/gcc/antlr-runtime-3.4.jar –enable-multilib –target=x86_64-slackware-linux –build=x86_64-slackware-linux –host=x86_64-slackware-linux
Thread model: posix
gcc version 4.8.2 (GCC)
darkstarfire@darkstar ~/Desktop $
Muchas gracias por este post! Cuando un blogger pone un aglomeración empeño y trabajo en su trabajo, se siente bien tener una réplica agradecida y educada, si hay o no hay un acuerdo sobre el tema. me encanta. gracias.
Muchas gracias por este post! Cuando un blogger pone un aglomeración empeño y trabajo en su trabajo, se siente bien tener una réplica agradecida y educada, si hay o no hay un acuerdo sobre el tema. me encanta. gracias.
Fedex Bentyl stromectol tablets for dogs We found that upon IgEantigen Ag binding to the highafnity Fc e RI receptor and b adrenergic stimulation of cardiomyocytes LysRS is specically phosphorylated on a serine Ser residue in a MAP kinase MAPKdependent manner
How Does Tadalista Tadalafil Work purchase cialis
clomid for pregnancy Barron Pharmacy- serves OH, MI, FL, PA, HI, TN.
lasix for dogs Monitor Closely 1 dabrafenib will decrease the level or effect of brexpiprazole by affecting hepatic intestinal enzyme CYP3A4 metabolism
Rapid visual inspection permits accurate diagnosis of atrophy, endometrial hyperplasia, polyps, fibroids, retained products of conception, and endometrial cancer buy cheap generic cialis uk Read the Medication Guide provided by your pharmacist before you start using Neophedan and each time you get a refill
While he has not been charged with any crimes since starting his MMA career, he received a three year prison sentence for a brutal assault on a businessman ivermectin scabies 2011 are given as symbols
priligy 30mg price The degree of cardiotoxicity of FU commercial solutions, tested on the isolated perfused rabbit heart model, is a function of the pH of the solution, and the preparations at pH 9
plaquenil generic brand
[url=https://plavixtabs.online/]cheap plavix 75 mg[/url] [url=https://arimidex.fun/]arimidex for pct[/url] [url=https://neurontintabs.online/]how much is neurontin pills[/url] [url=https://happydrugstores.online/]cheap canadian pharmacy[/url]
6 months 95 CI 20 cialis from india
levitra ou cialis generique Monitor Closely 1 propofol and papaverine both increase sedation
js混淆 hello my website is js混淆
xl akrab hello my website is xl akrab
Truyen dragon hello my website is Truyen dragon
Faded (karaoke) hello my website is Faded (karaoke)
jkt48 gadis hello my website is jkt48 gadis
boca bop hello my website is boca bop
sentosa reservation hello my website is sentosa reservation
aplikasi idrpoker hello my website is aplikasi idrpoker
perak 1973 hello my website is perak 1973
Erectile, This is a good website Erectile
Impotence, This is a good website Impotence
Suggestive, This is a good website Suggestive
Nudity, This is a good website Nudity
Blue pill, This is a good website Blue pill
Scrotum, This is a good website Scrotum
Explicit, This is a good website Explicit
Testicles, This is a good website Testicles
Scrotum, This is a good website Scrotum
1, 30 years to the day he became commissioner levitra 20mg generique en ligne Klinefelter syndrome is the strongest risk factor
vidalista 20 centurion laboratories https://community.alteryx.com/t5/user/viewprofilepage/user-id/524454/ purchase Cenforce pill
buy fildena 150 online
Can I get OTC options for facial pain relief kamagra 100 mg?
How can you confirm that the online pharmacy has mechanisms for verifying the identity of patients and prescribers vidalista pro?
Are there any restrictions on the quantity of medications I can order online levitra kaufen?
Who Is Britt On Brian Christopher Slots? Brian follows you on Facebook or Instagram ✋рџ’° Betting $4,000 on 2 HIGH LIMIT Slot Machines рџЋ°рџЋ° Fruit Machine Pokies w Brian Christopher Let’s kick off the series with Brian Christopher, who as of this writing has the largest following for slot machine videos on YouTube. Since Brian has launched his channel in the spring of 2016, he’s built of a very loyal following, and posts about a dozen videos and live streams each and every week. In a world where influencers try everything they can to convince us to follow them, Brian Christopher has found success in just being himself. He’s managed to bring slots to people from all walks of life – even those who don’t gamble. While you don’t have to be a slot aficionado to tune in, you might be by the time you log out. We can’t wait to tune in to Brian Christopher today, tomorrow, and in many more years to come.
https://www.shtfsocial.com/blogs/176494/all-reviews
Betway is a world-class provider of online sports betting, casino, bingo and poker and have over two million customers using its services world wide. Its software and games are provided by one of the most long standing and reputable providers within the industry, Microgaming. As well as providing great entertainment, Betway treats safety, security and customer service with the greatest importance. One of the popular casino slots in the Betway, Starburst from NetEnt is a classy game with a theme that’s set in the cosmic world. This slot is played over five reels and its key feature is an expanding Starburst wild that expands over the full reel and triggers a respin. Once you have signed up as a customer at the Betway Casino Pennsylvania, you will have access to ongoing promotions. There should be several Betway PA online casino promo opportunities to enjoy when you begin playing regularly.
Brace yourself for parking new games 2024 and get ready to have thrilling experience while playing new car parking games 3d. If you love car games you have come at right game. This free games 2024 new has all the amazing features of advance offline hard car parking game. Play addictive levels of car parking and get amazing driving skills of multiplayer car parking games new 2024. • Exchange cars with real players. While driving, focus on precision rather than speed. Always keep an eye on obstacles and try to park within minimum time for higher scores. Remember that practice is key – each attempt will hone your parking prowess. “Car Parking Simulator Master” sets itself apart with its realistic and immersive gameplay. Whether you’re a novice or a seasoned driver, this game offers a range of difficulty levels to cater to all skill levels. Get ready to test your precision, timing, and patience as you navigate through a variety of challenging parking scenarios.
https://wiki.gta-zona.ru/index.php/Gta_5_epic_games_mod
My Neighbor Alice is an upcoming multiplayer farm and builder game. Players can buy land spread around six islands, farm it, and buy animals from the marketplace. It has a lighthearted design that will remind many gamers of the Animal Crossing series. The character Alice serves as an “in-game friend,” which could make this more beginner-friendly than most blockchain games. “ made the business decision to forego an expensive and time-consuming process to create a functional CryptoZoo game or support it, and instead deliberately undertook a scheme to defraud Plaintiff and other consumers,” the lawsuit reads. Filed in the Western District of Texas, the lawsuit also states that there may be thousands of “victims” who are eligible to join if granted class action status.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.