You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the highRoller() function is returning 2 numbers as playerFirstTotal and playerSecondTotal.
We should create an intermediate function that returns 2 number[2] arrays
This creates weird UI where all rolls seem to resolve to double dice rolls:
getDieNumbers(totalSum: number): [number,number]{// Choose result for each die.if(totalSum===12){return[6,6];}if(totalSum>2&&totalSum<12){return[Math.floor(totalSum/2),Math.ceil(totalSum/2)];}if(totalSum>2&&totalSum%2===0){return[Math.floor(totalSum/2)-1,Math.ceil(totalSum/2)+1];}return[totalSum/2,totalSum/2];}
So a roll of 6 on the contract will always show [3,3] even if it was [6,0]
The text was updated successfully, but these errors were encountered:
Currently the
highRoller()
function is returning 2 numbers asplayerFirstTotal
andplayerSecondTotal
.We should create an intermediate function that returns 2 number[2] arrays
This creates weird UI where all rolls seem to resolve to double dice rolls:
So a roll of 6 on the contract will always show [3,3] even if it was [6,0]
The text was updated successfully, but these errors were encountered: