SergioB-dev / rust-regex-pro

CLI Regex Trainer - A collaborative rust project for regex enthusiasts
0 stars 2 forks source link

Creating regex questions #14

Open SergioB-dev opened 2 years ago

SergioB-dev commented 2 years ago

Now that we have a pretty good structure on our project, we need to come up with questions. It's also worth noting that we have three Levels that a User can work through. So questions should be triaged appropriately.

PavlosMac commented 2 years ago

I am putting together some questions slowly.

pub struct Question {
    pub explanation: &'static str,
    pub search_string: &'static str,
    pub filler_string: Option<&'static str>,
    pub filler_order: FillerOrder,
    pub points: u32,
    pub ranking: Ranking,
}

I think Ranking on Question should be removed. It will require having too many different levels of difficulty associated with a question. Instead, we can replace it with Level then have an algorithm figure out how to increase/decrease points for a user.

For example, if a question has Level::Hard and a has selected User is Level::Easy, then their winning points are a factor larger than a user who selected Level::Hard and answered the same question correctly.

I propose this.

pub struct Question {
    pub explanation: &'static str,
    pub search_string: &'static str,
    pub filler_string: Option<&'static str>,
    pub filler_order: FillerOrder,
    pub points: u32,
    pub level: Level,
}
SergioB-dev commented 2 years ago

I see your point. I agree with you that Ranking may be unnecessary but it also seems like we should have another criteria than just the score. It seems redundant to have Level serve for both Question and User. Also for reference if a Level::Easy player answers a Level::Hard question its debatable whether or not we'd want to earn more points than a Level::Hard player.

I guess the question becomes what are we really rewarding the User for?

I like your suggestion though and I'm curious to see how it plays out.

PavlosMac commented 2 years ago

I agree with you that it seems very simple without criteria other than score. I agree with your second point as well.

I have a couple of ideas that I will code to, I think I need to jump in at this point. It will take me some time anyway to come up with a bunch of questions. So I will explore some ideas in the code, whilst doing that.