3 ms·
This is a super neat idea. Thanks so much for making it! Some small comments: I found the tutorial video painfully slow, but maybe you're targeting beginning
by rrradical 13y ago
This is a super neat idea. Thanks so much for making it!
Some small comments:
I found the tutorial video painfully slow, but maybe you're targeting beginning programmers. All I was looking for was-- what's the language, what's the api.
The determining function could easily be a pure function. I.e., it could designate the winner by returning true, or false, or an enum/constant.
Actually, I think I would prefer this API:
function (team)
{
return team.off_reb * team.win_pct;
}
And then play the teams by calculating the scores for each team and comparing them. But then of course, you can't have different scores depending on the opponent. I wouldn't use that information, but perhaps others would.
- alxndr 13y agore: your API comment: seems like putting extra functions into the outer context breaks the parser, but putting them inside the main anonymous function worked for me.