Skip to content

Mastermind written in C for season 01 arc 01 of Qwasar. Did this on March 22nd, transferring from Qwasar's Gitea.

Notifications You must be signed in to change notification settings

TedTran2019-Qwasar/Mastermind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

my_mastermind

My implementation of the Mastermind game.

-c specifies the secret code, otherwise it'll be randomly generated. -t specifies the number of attempts, otherwise it'll be 10 by default.

Example of valid inputs:

  1. ./my_mastermind
  2. ./my_mastermind -c 0123 [Any non-4 digit code will return invalid input.]
  3. ./my_mastermind -t 2147483647 [Input < 1 or Input > 2147483647 will be invalid]
  4. ./my_mastermind -c 0123 -t 2147483647
  5. ./my_mastermind -c 0123 -c 1111 -c 2222 -t 11 -t 12 -c 2222

Once gameplay has started, enter 4 numbers ranging from 0-7.

  1. "1234" is valid input, "8899" is invalid input, "01234" is invalid

To compile: make Use leaks -atExit -- ./my_mastermind to check for memory leaks.

If you're testing on Qwasar's platform, I have no idea. It seems like they don't have Valgrind or Leaks pre-installed, so possibly try -fsanitize=address -fno-omit-frame-pointer while compiling and look up LeakSanitizer's documentation on Github.

About

Mastermind written in C for season 01 arc 01 of Qwasar. Did this on March 22nd, transferring from Qwasar's Gitea.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published