olistic / warriorjs

🏰 An exciting game of programming and Artificial Intelligence
https://warriorjs.com
MIT License
9.43k stars 490 forks source link

Add silent flag to the cli command to supress game logs (#46) #82

Closed xaviserrag closed 6 years ago

xaviserrag commented 6 years ago

Modified the CLI project to accept a --silent value so the gameplay skips the play logs.

Had to use -m (mute) for the short version of the command since -s was already used, open to suggestions on using other options.

Saw this project yesterday and I loved it, keep up the good work! ;)

Closes #46

codecov-io commented 6 years ago

Codecov Report

Merging #82 into master will decrease coverage by 0.07%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #82      +/-   ##
==========================================
- Coverage   91.13%   91.05%   -0.08%     
==========================================
  Files          81       81              
  Lines        1049     1051       +2     
  Branches      168      169       +1     
==========================================
+ Hits          956      957       +1     
  Misses         77       77              
- Partials       16       17       +1
Impacted Files Coverage Ξ”
packages/warriorjs-cli/src/parseArgs.js 100% <ΓΈ> (ΓΈ) :arrow_up:
packages/warriorjs-cli/src/cli.js 100% <100%> (ΓΈ) :arrow_up:
packages/warriorjs-cli/src/Game.js 53.16% <60%> (-0.05%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update d412e78...9450604. Read the comment docs.

olistic commented 6 years ago

@xaviserrag Also, if you can add tests to this to at least preserve the coverage, that'd be awesome!

olistic commented 6 years ago

@xaviserrag Just writing to let you know that --skip (and -s) where removed in favor of --yes (#93). -s is now available for you to use with --silent.

xaviserrag commented 6 years ago

Sounds good! Will go through the changes soon!

olistic commented 6 years ago

@xaviserrag I just noticed that the documentation needs to be updated as well (it lists the options in alphabetical order).

xaviserrag commented 6 years ago

Thanks!