xylafur / dnd-generator

Tool to help us in our campaign
1 stars 0 forks source link

Some modifications #6

Closed TetroVolt closed 6 years ago

TetroVolt commented 6 years ago

I fixed some of the import errors we were getting when we were just trying to run ./dnd-gen -h

I changed the imports from from lib.random_ext to from lib.random_die

Of course this could all be a mistake since I notice that in the main project directory under py_cache there is a separate random_ext bytecode file so that means random_ext is its own module but it is not present in master and so master is currently broken. Someone needs to add that file and push it

I also did my version of roll_die, let me know what yall think. I think its more elegant but the old one is not broken so its up to yall (really Jackson) to approve my pull request.

ghost commented 6 years ago

2 things:

Do we need the wrapper methods like they are now? We should decide on a standard and update code to that, and it seems like we wouldn't need those if we do it your way.

Secondly, is there any use for a 0, n-1 versus a 1, n randomizer? Is there a use case for having zero as a number, versus simply subtracting one from the result? If there's a use case that's fine, but it seems like unnecessary bloat.

Otherwise, it looks fine to me.

TetroVolt commented 6 years ago

Yeah I was thinking about that, I was concerned because on some die like the d10 or was it d100, they have 0 numbers but yeah we could just tack on -1 at the end. As for wrapper functions, I kept them there for now because some of the story generators call those wrapper functions and I did not want to bother refactoring them for now.

ghost commented 6 years ago

I can refactor. I'll let @xylafur chime in before we pull though. We need to decide on a standard and stick with it.