Skip to content

Commit

Permalink
Reduced probability of accusative animate
Browse files Browse the repository at this point in the history
  • Loading branch information
kyletimmermans committed Aug 18, 2023
1 parent 8d9ac18 commit 60b6908
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ const randomGender = (plural) => {

const randomCase = (animate) => {
if (animate == true) {
let gramcase = getRandomString(["gn", "dt", "aca", "aci", "in", "pr"]);
let gramcase = getRandomString(["gn", "dt", "ac", "in", "pr"]);
// 2nd round for accusative choice (1/4 chance for animate)
if (gramcase == "ac") {
gramcase = getRandomString(["aca", "aci", "aci", "aci",]);
}
let finalCase;
switch (gramcase) {
case "gn":
Expand Down Expand Up @@ -270,7 +274,8 @@ const randomQuestionWord = (data) => {
let gramcase = randomCase(true);

if (randomQuestion.name == "что" || randomQuestion.name == "кто") {
if (gramcase[0] == "aca" || gramcase[0] == "aca") {
// что and кто have no animate option
if (gramcase[0] == "aca" || gramcase[0] == "aci") {
gramcase[1] = "Accusative";
gramcase[0] = "ac";
}
Expand Down

0 comments on commit 60b6908

Please sign in to comment.