realm-of-ra / mancala

https://meowing-anteater-cee.notion.site/Mancala-Game-MVP-7521e2f2e5294575b33b17601afde810
MIT License
9 stars 26 forks source link

Create test for the Capture logic #24

Closed web3technologies closed 1 week ago

web3technologies commented 1 month ago

In the contract code we do not yet have logic to test that captures are working successfully. The test exists but the capture logic is not being tested. We need to write a test for this and ensure that all of it is functioning properly.

The test can be found here. https://github.com/realm-of-ra/mancala/blob/develop/contracts/src/tests/test_world.cairo#L115 The implementation of the capture logic can be found here: https://github.com/realm-of-ra/mancala/blob/develop/contracts/src/models/mancala_game.cairo#L167

mubarak23 commented 1 month ago

@web3technologies kindly assign this issue to me.

web3technologies commented 1 month ago

@mubarak23 do you have any updates or need any assistance with this issue?

xpanvictor commented 4 weeks ago

The capture implementation is now at https://github.com/realm-of-ra/mancala/blob/7a80ad80c38762acbfd1d01ad886a68bf68b1dbc/contracts/src/models/mancala_game.cairo#L188 and test at https://github.com/realm-of-ra/mancala/blob/7a80ad80c38762acbfd1d01ad886a68bf68b1dbc/contracts/src/tests/test_world.cairo#L164

web3technologies commented 4 weeks ago

@xpanvictor yes these functions already exist and we need to test that the capture logic is properly implemented. Are you wanting to take this issue?

xpanvictor commented 3 weeks ago

Yes, assign me to this, I'll work on it @web3technologies

manlikeHB commented 2 weeks ago

Hi @web3technologies, I have experience implementing a starknet component and writing test for it from the previous ODHack, I would be a perfect fit for this issue.

No-bodyq commented 2 weeks ago

Hello @web3technologies, can I get assigned this issue. Here is my profile https://app.onlydust.com/u/No-bodyq I have some experience writing tests as you may see on my profile

the-first-elder commented 2 weeks ago

I can do this

Josh-121 commented 2 weeks ago

I've looked into this and I'm confident in delivering this if assigned. 2-3 days

No-bodyq commented 1 week ago

image Hello, Can i have some assistance with this... I'm working from a codespace. I've installed dojo and scarb but i keep getting this error code whenever i try to run scarb test or scarb cairo-test. Am i missing something?

okhaimie-dev commented 1 week ago

@No-bodyq you cannot use Scarb as a package manager for dojoengine.

If you followed this step to install dojo https://book.dojoengine.org/getting-started#install-using-dojoup, it should come with the sozo package manager. = run sozo test instead

Maybe go through this tutorial to help you get familiar with dojo https://book.dojoengine.org/tutorial/dojo-starter

Feel free to join project telegram if you need further assistance: https://t.me/+0UKU3P3Eh_s2NTRh