sivicstudio / starkludo

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

Create logic for `roll_dice` function #43

Closed princeibs closed 2 weeks ago

princeibs commented 2 weeks ago

Description

This logic is expected to generate a random number between 1 to 6 anytime the function is invoked. Endeavour to explore Origimi and how it can help with such while working this task.

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

File(s) to modify:

NueloSE commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a frontend dev with experience in write smart contracts and also have used cairo for writing simple smaart contract and i would be able to contribute to this task given my experience in smart contract dev. kindly assign me

How I plan on tackling this issue

  1. create a roll_dice function that uses random module to generate random numbers
  2. create a uint test suit to test the function state before and after it implementation
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, please assign

GoSTEAN commented 2 weeks ago

I am applying via OnlyDust Platform

I am a frontend developer and a smart contract developer.

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 web3 developer would like to take this up

How I plan on tackling this issue

Implement roll_dice Function:

Language: Cairo Task: Generate a random number between 1 and 6. Explore: Look into Origami for potential tools or libraries that can assist with random number generation in Cairo. Modify game_actions.cairo:

Add the logic for the roll_dice function in this file. Create Unit Tests:

Language: TypeScript Task: Write unit tests to verify that the roll_dice function correctly generates a number between 1 and 6. Run Tests:

Execute the unit tests to ensure the function behaves as expected. Submit Changes:

Create a pull request with your modifications and unit tests for review.

estherbreath commented 2 weeks ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a fullstack developer and would like to work on this issue.

I will leverage on my background by implementing a random number generation function in Cairo, utilizing Origami's VRF capabilities, and creating unit tests to verify correctness.

How I plan on tackling this issue

Here's a summary of how i will tackle the issue

• Import necessary modules from Origami. 
• Define a function that uses Origami's random number generator. 
• Set up the range (1 to 6) for the random number generation. 
• Write unit tests to check various scenarios (e.g., numbers within range, distribution   
onlydustapp[bot] commented 2 weeks ago

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