Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add darts #177

Merged
merged 12 commits into from
Nov 17, 2023
Merged

Add darts #177

merged 12 commits into from
Nov 17, 2023

Conversation

BNAndras
Copy link
Member

@BNAndras BNAndras commented Oct 9, 2023

Related to #172

@BNAndras
Copy link
Member Author

BNAndras commented Oct 9, 2023

I’ll troubleshoot tomorrow. The darts tests passed locally.

@BNAndras
Copy link
Member Author

BNAndras commented Oct 9, 2023

Still getting (X) Vim(call):E118: Too many arguments for function: Score. The auto-generated tests pass in two arguments each time. The Score function in example.vim also takes two arguments. Since the CI uses 8.2 and I'm on 9.0, I removed the earlier pow call in case that was the actual culprit, but that wasn't it apparently.

@BNAndras
Copy link
Member Author

BNAndras commented Oct 9, 2023

All 13 tests pass locally on 8.2 without modification so that's not the problem

@BNAndras
Copy link
Member Author

Reviewed my assumptions and I found the culprit. The CI (below) sources each example.vim before running all the tests.dart's Score takes two arguments but is later overwritten by the single-argument Score from scrabble-score. I need to change Score's name to avoid the problem. I'm thinking ScrabbleScore is a bit verbose but is more meaningful than MyScore.

for file in glob('exercises/practice/*/.meta/example.vim', 0, 1)
  execute 'source' file
endfor

@kotp
Copy link
Member

kotp commented Oct 14, 2023

Reviewed my assumptions and I found the culprit. The CI (below) sources each example.vim before running all the tests.dart's Score takes two arguments but is later overwritten by the single-argument Score from scrabble-score. I need to change Score's name to avoid the problem. I'm thinking ScrabbleScore is a bit verbose but is more meaningful than MyScore.

for file in glob('exercises/practice/*/.meta/example.vim', 0, 1)
  execute 'source' file
endfor

We should make that not happen. We should be doing this before running each test, and only for the tested folder, not before running all tests.

It was just a matter of time before we were going to colide.

@BNAndras
Copy link
Member Author

I’ll take a look this weekend.

@BNAndras
Copy link
Member Author

@kotp, I renamed Score to DartScore to avoid the original naming issue. We'll still need to deal with the CI in the other PR so it doesn't come up again.

@kotp
Copy link
Member

kotp commented Nov 16, 2023

We could change it to Darts as it describes the game in general.

@BNAndras
Copy link
Member Author

Makes sense. I thought briefly about naming it DartToss so I'll revise.

@kotp kotp merged commit 8881110 into exercism:main Nov 17, 2023
3 checks passed
@BNAndras BNAndras deleted the add-darts branch November 18, 2023 18:07
@BNAndras BNAndras added x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation labels Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:module/practice-exercise Work on Practice Exercises x:rep/medium Medium amount of reputation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants