Game for learning how to code.
Find a file
gosnat 939509849c Update GoalManager.coffee
Justification:

For a negative goal like saveThangs, let's say you have 5 thangs on the save list.  As things stand, if you don't have a HowMany defined, then the number of needed deaths to fail is 

numNeeded = _.size(stateThangs) - Math.min((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.min(1, 5) + 1
numNeeded = 5

So you would only fail the goal if all 5 thangs you were supposed to save died.  This is contrary to the comment right above this line:

# saveThangs: by default we would want to save all the Thangs, which means that we would want none of them to be "done"

Therefore, I think it should be Math.max rather than Math.min.

numNeeded = _.size(stateThangs) - Math.max((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.max(1, 5) + 1
numNeeded = 1

So any of the Thangs on the save list dying is enough to fail the goal.

As a double check, what if the level designer designated a HowMany of 5?

numNeeded = _.size(stateThangs) - Math.max((goal.howMany ? 1), _.size stateThangs) + 1
numNeeded = 5 - Math.max(5, 5) + 1
numNeeded = 1

So this is consistent.
2014-05-05 14:08:41 -05:00
app Update GoalManager.coffee 2014-05-05 14:08:41 -05:00
bin Change dev server to watch app/schemas 2014-05-03 18:39:14 -04:00
scripts fixed more errors related to recent pull request merges in the window dev scripts 2014-04-29 05:03:05 +02:00
server Added a handler for fetching names of versioned docs by originals. 2014-04-28 14:31:11 -07:00
test Added reserved word checking for names. 2014-04-28 14:09:29 -07:00
vendor Merge branch 'master' into feature/loading-views 2014-04-25 14:31:58 -07:00
.gitignore Fixed .gitignore. 2014-04-28 14:05:09 -07:00
.npmignore
.travis.yml
bower.json Propagated Wu name update. 2014-05-03 07:21:18 -07:00
config.coffee hasChangedSignificantly async refactor 2014-04-22 08:54:35 -07:00
CONTRIBUTING.md Modified python scripts to support both python2.7 and python3 natively 2014-02-11 04:30:58 +10:00
index.js Upgraded to CoffeeScript 1.7 2014-02-11 14:23:36 -08:00
karma.conf.js
LICENSE
package.json gzipping when in production but not going through Cloudflare. 2014-04-17 10:12:23 -07:00
README.md Updated Glen's portrait URL in the README. 2014-03-23 16:15:30 -07:00
server.coffee Merge pull request from codecombat/master 2014-02-05 09:38:18 -08:00
server_config.coffee Added ip checks on cron mail route 2014-03-12 08:11:48 -07:00
server_setup.coffee Fixed up some styles for job profile page, and prevented long links from destroying things with poor wrapping. 2014-04-17 11:34:55 -07:00

CodeCombat

Build Status

CodeCombat is a multiplayer programming game for learning how to code. See the Archmage developer wiki for a dev setup guide, extensive documentation, and much more.

It's both a startup and a community project, completely open source under the MIT and Creative Commons licenses. It's the largest open source CoffeeScript project by lines of code, and since it's a game (with really cool tech), it's really fun to hack on. Join us in teaching the world to code! Your contribution will go on to show millions of players how cool programming can be.

Getting Started

We've made it easy to fork the project, run a simple script that'll install all the dependencies, and get a local copy of CodeCombat running right away on Mac, Linux, or Windows. See the docs for details.

Getting In Touch

Whether you're novice or pro, the CodeCombat team is ready to help you implement your ideas. Reach out on our forum, our issue tracker, or our developer chat room, or see the docs for more on how to contribute.

License

MIT for the code, and CC-BY for the art and music. Please also sign the CodeCombat contributor license agreement so we can accept your pull requests. It is easy.

Join Us!

George Saines Scott Erickson Nick Winter Michael Schmatz Jeremy Arns Glen De Cauwsemaecker Tom Steinbrecher Sébastien Moratinos deepak1556 Ronnie Cheng Chloe Fan Rachel Xiang Dan Ristic Brad Dickason Rebecca Saines Laura Watiker Shiying Zheng Mischa Lewis-Norelle Paul Buser Benjamin Stern Alex Cotsarelis Ken Stanley Robert Moreton Andrew Witcher Axandre Oge Katharine Chan Derek Wong