Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
4 lines solution in Creative category for Rolling 🎲! by StefanPochmann
def rolling_dice(moves: str) -> int:
a, b = 1, {'N': 2, 'W': 3}
for m in moves.replace('S', 'NNN').replace('E', 'WWW'):
a, b[m] = b[m], 7 - a
return a
April 29, 2023
Comments: