sivicstudio / starkludo

Ludo game on Starknet
https://testnet.starkludo.com
MIT License
8 stars 27 forks source link

Create logic for `get_player_stats` function #40

Closed princeibs closed 1 week ago

princeibs commented 2 weeks ago

Description

The logic is expected to fetch the player stats from the World and return the following:

Test Create unit test for this particular function to verify the correctness of the logic implemented

File(s) to modify:

ikemHood commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @princeibs, I am Ikem Peter a fullstack developer and I have contributed to 4 different projects through Onlydust.

I would like to take on this issue.

ETA: 24hrsi

CollinsC1O commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

l'm a front end and also a smart contract developer. I will love to work on this

fishonamos commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Backend Developer

How I plan on tackling this issue

To implement the get_player_stats function in playeractions, I would fetch the player's game data from the World contract. This includes game history, results, and points scored. I would then iterate through the game data to calculate the number of games played, number of wins, and total points earned.

ETA: 24hrs

Kaminar-i commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i'm a block chain dev and i would love to take on this issue

How I plan on tackling this issue

Implement get_player_stats Function:

Language: Cairo Task: Fetch and return player statistics including: Number of games played Number of games won Total points earned Position on the leaderboard File: Modify player_actions.cairo to include this function. Create Unit Tests:

Language: TypeScript Task: Write unit tests to verify the correctness of the get_player_stats function. Ensure it accurately retrieves and returns the correct player statistics. Run and Validate Tests:

Execute the unit tests to confirm that the function works as expected and correctly handles various scenarios. Submit Changes:

Create a pull request with the updated player_actions.cairo file and the unit tests for review.

onlydustapp[bot] commented 2 weeks ago

The maintainer princeibs has assigned fishonamos to this issue via OnlyDust Platform. Good luck!