class Interaction { // Name of the interaction to show the player String name = ""; // drawing collision int x = 0; int y = 0; int w = 75; int h = 20; color c = color(0, 200, 0); // In what state the interaction belongs EmoState state = null; Interaction(String name, EmoState state) { this.name = name; this.state = state; } EmoState resolveInteraction(EmoState currState) { int resultBranch = -1; int resultStr = -1; switch(currState.emotionBranch) { /****** JOY ******/ case 0: switch(currState.emotionStr) { case 0: if (this.name == "shy smile") { resultBranch = 0; resultStr = 1; } else if (this.name == "smile") { resultBranch = 0; resultStr =1; } else if (this.name == "grin") { resultBranch = 0; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 0; resultStr =1; } else if (this.name == "laugh") { resultBranch = 0; resultStr =2; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =1; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =0; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 1; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =0; } else if (this.name == "bow") { resultBranch = 1; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 1; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =0; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =1; } else if (this.name == "scream") { resultBranch = 4; resultStr =1; } else if (this.name == "stare") { resultBranch = 15; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 15; resultStr =0; } else if (this.name == "worship") { resultBranch = 15; resultStr =1; } else if (this.name == "gasp") { resultBranch = 15; resultStr =0; } else if (this.name == "double-take") { resultBranch = 15; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 15; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =0; } else if (this.name == "cry") { resultBranch = 8; resultStr =1; } else if (this.name == "bawl") { resultBranch = 8; resultStr =1; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 6; resultStr =0; } else if (this.name == "sneer") { resultBranch = 6; resultStr =1; } else if (this.name == "glower") { resultBranch = 6; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =0; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =0; break; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =0; } else if (this.name == "stare") { resultBranch = 15; resultStr =1; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =1; } break; case 1: /***** STRENGTH 1 JOY *****/ if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =1; } else if (this.name == "grin") { resultBranch = 0; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 0; resultStr =2; } else if (this.name == "laugh") { resultBranch = 0; resultStr =2; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 1; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "bow") { resultBranch = 1; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 1; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =0; } else if (this.name == "whimper") { resultBranch = 4; resultStr =0; } else if (this.name == "gasp") { resultBranch = 4; resultStr =1; } else if (this.name == "scream") { resultBranch = 4; resultStr =1; } else if (this.name == "stare") { resultBranch = 15; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 15; resultStr =0; } else if (this.name == "worship") { resultBranch = 15; resultStr =1; } else if (this.name == "gasp") { resultBranch = 15; resultStr =0; } else if (this.name == "double-take") { resultBranch = 15; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 15; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 0; resultStr =0; } else if (this.name == "cry") { resultBranch = 0; resultStr =0; } else if (this.name == "bawl") { resultBranch = 8; resultStr =1; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 6; resultStr =0; } else if (this.name == "sneer") { resultBranch = 6; resultStr =1; } else if (this.name == "glower") { resultBranch = 6; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =0; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =0; break; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =0; } else if (this.name == "stare") { resultBranch = 15; resultStr =1; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =1; } break; case 2: /***** STR 2 ECSTASY *****/ if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =1; } else if (this.name == "grin") { resultBranch = 0; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 0; resultStr =2; } else if (this.name == "laugh") { resultBranch = 0; resultStr =2; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 1; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "bow") { resultBranch = 1; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 1; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 0; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 0; resultStr =1; } else if (this.name == "shiver") { resultBranch = 0; resultStr =1; } else if (this.name == "whimper") { resultBranch = 0; resultStr =1; } else if (this.name == "gasp") { resultBranch = 0; resultStr =0; } else if (this.name == "scream") { resultBranch = 0; resultStr =0; } else if (this.name == "stare") { resultBranch = 15; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 15; resultStr =0; } else if (this.name == "worship") { resultBranch = 15; resultStr =1; } else if (this.name == "gasp") { resultBranch = 15; resultStr =0; } else if (this.name == "double-take") { resultBranch = 15; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 15; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 0; resultStr =1; } else if (this.name == "cry") { resultBranch = 0; resultStr =1; } else if (this.name == "bawl") { resultBranch = 0; resultStr =0; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 6; resultStr =0; } else if (this.name == "sneer") { resultBranch = 6; resultStr =0; } else if (this.name == "glower") { resultBranch = 6; resultStr =1; } else if (this.name == "snub") { resultBranch = 0; resultStr =1; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =1; } else if (this.name == "growl") { resultBranch = 8; resultStr =0; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =0; break; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =0; } else if (this.name == "stare") { resultBranch = 15; resultStr =1; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =1; } break; } break; case 1: // Love ///////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 0; resultStr =0; } else if (this.name == "laugh") { resultBranch = 0; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =1; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 1; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 1; resultStr =1; } else if (this.name == "bow") { resultBranch = 1; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 1; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =1; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 15; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 15; resultStr =0; } else if (this.name == "worship") { resultBranch = 15; resultStr =1; } else if (this.name == "gasp") { resultBranch = 15; resultStr =0; } else if (this.name == "double-take") { resultBranch = 15; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 15; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 0; resultStr =0; } else if (this.name == "cry") { resultBranch = 0; resultStr =0; } else if (this.name == "bawl") { resultBranch = 8; resultStr =1; } else if (this.name == "bow") { resultBranch = 0; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 6; resultStr =0; } else if (this.name == "sneer") { resultBranch = 6; resultStr =1; } else if (this.name == "glower") { resultBranch = 6; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =0; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =0; break; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =0; } else if (this.name == "stare") { resultBranch = 15; resultStr =1; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =1; } break; case 2: // Trust switch(currState.emotionStr) { case 0: // ACCEPTANCE ////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 1; resultStr = 0; } else if (this.name == "smile") { resultBranch = 1; resultStr =0; } else if (this.name == "grin") { resultBranch = 1; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 1; resultStr =0; } else if (this.name == "laugh") { resultBranch = 1; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 1; resultStr =1; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 3; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =0; } else if (this.name == "whimper") { resultBranch = 4; resultStr =0; } else if (this.name == "gasp") { resultBranch = 4; resultStr =1; } else if (this.name == "scream") { resultBranch = 4; resultStr =1; } else if (this.name == "stare") { resultBranch = 0; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 0; resultStr =0; } else if (this.name == "worship") { resultBranch = 0; resultStr =1; } else if (this.name == "gasp") { resultBranch = 0; resultStr =0; } else if (this.name == "double-take") { resultBranch = 0; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 0; resultStr =1; } else if (this.name == "frown") { resultBranch = 15; resultStr =0; } else if (this.name == "shake head") { resultBranch = 15; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 15; resultStr =0; } else if (this.name == "cry") { resultBranch = 15; resultStr =0; } else if (this.name == "bawl") { resultBranch = 8; resultStr =0; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 12; resultStr =0; } else if (this.name == "sneer") { resultBranch = 12; resultStr =1; } else if (this.name == "glower") { resultBranch = 12; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =0; } else if (this.name == "shove") { resultBranch = 8; resultStr =1; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =0; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 8; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 8; resultStr =0; break; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 1; resultStr =0; } else if (this.name == "taunt") { resultBranch = 1; resultStr =0; } else if (this.name == "shove") { resultBranch = 1; resultStr =1; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 1; resultStr =0; } else if (this.name == "stare") { resultBranch = 1; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 1: // TRUST /////////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 1; resultStr = 0; } else if (this.name == "smile") { resultBranch = 1; resultStr =1; } else if (this.name == "grin") { resultBranch = 1; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 1; resultStr =0; } else if (this.name == "laugh") { resultBranch = 1; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 1; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =2; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =2; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =1; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 0; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 0; resultStr =1; } else if (this.name == "worship") { resultBranch = 0; resultStr =2; } else if (this.name == "gasp") { resultBranch = 0; resultStr =0; } else if (this.name == "double-take") { resultBranch = 0; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 0; resultStr =1; } else if (this.name == "frown") { resultBranch = 15; resultStr =0; } else if (this.name == "shake head") { resultBranch = 15; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 15; resultStr =0; } else if (this.name == "cry") { resultBranch = 8; resultStr =0; } else if (this.name == "bawl") { resultBranch = 8; resultStr =1; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 12; resultStr =0; } else if (this.name == "sneer") { resultBranch = 12; resultStr =1; } else if (this.name == "glower") { resultBranch = 12; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =1; } else if (this.name == "snarl") { resultBranch = 8; resultStr =2; } else if (this.name == "yell") { resultBranch = 8; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 8; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 1; resultStr =0; } else if (this.name == "taunt") { resultBranch = 1; resultStr =0; } else if (this.name == "shove") { resultBranch = 1; resultStr =1; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 1; resultStr =0; } else if (this.name == "stare") { resultBranch = 1; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 2:// ADMIRATION ////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 1; resultStr = 1; } else if (this.name == "smile") { resultBranch = 1; resultStr =1; } else if (this.name == "grin") { resultBranch = 1; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 1; resultStr =1; } else if (this.name == "laugh") { resultBranch = 1; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 1; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =2; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =2; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =2; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =2; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =2; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 3; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 3; resultStr =1; } else if (this.name == "shiver") { resultBranch = 3; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 0; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 0; resultStr =2; } else if (this.name == "worship") { resultBranch = 1; resultStr =2; } else if (this.name == "gasp") { resultBranch = 0; resultStr =1; } else if (this.name == "double-take") { resultBranch = 0; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 0; resultStr =1; } else if (this.name == "frown") { resultBranch = 2; resultStr =1; } else if (this.name == "shake head") { resultBranch = 2; resultStr =1; } else if (this.name == "snub") { resultBranch = 2; resultStr =0; } else if (this.name == "sniffle") { resultBranch = 2; resultStr =0; } else if (this.name == "cry") { resultBranch = 15; resultStr =1; } else if (this.name == "bawl") { resultBranch = 15; resultStr =2; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 3; resultStr =0; } else if (this.name == "sneer") { resultBranch = 5; resultStr =1; } else if (this.name == "glower") { resultBranch = 5; resultStr =1; } else if (this.name == "snub") { resultBranch = 5; resultStr =1; } else if (this.name == "shove") { resultBranch = 5; resultStr =1; } else if (this.name == "spit on") { resultBranch = 8; resultStr =1; } else if (this.name == "growl") { resultBranch = 8; resultStr =1; } else if (this.name == "snarl") { resultBranch = 8; resultStr =1; } else if (this.name == "yell") { resultBranch = 5; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 8; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 5; resultStr =0; } else if (this.name == "tease") { resultBranch = 1; resultStr =0; } else if (this.name == "taunt") { resultBranch = 1; resultStr =0; } else if (this.name == "shove") { resultBranch = 1; resultStr =1; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 1; resultStr =0; } else if (this.name == "stare") { resultBranch = 1; resultStr =1; } else if (this.name == "clap") { resultBranch = 5; resultStr =0; } else if (this.name == "cheer") { resultBranch = 5; resultStr =1; } else if (this.name == "high-five") { resultBranch = 5; resultStr =1; } break; } break; case 3: // Submission ///////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 2; resultStr = 0; } else if (this.name == "smile") { resultBranch = 2; resultStr =1; } else if (this.name == "grin") { resultBranch = 2; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 1; resultStr =0; } else if (this.name == "laugh") { resultBranch = 2; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 2; resultStr =2; } else if (this.name == "wink") { resultBranch = 2; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 2; resultStr =1; } else if (this.name == "flirt") { resultBranch = 2; resultStr =1; } else if (this.name == "admire") { resultBranch = 2; resultStr =1; } else if (this.name == "hug") { resultBranch = 2; resultStr =1; } else if (this.name == "dance") { resultBranch = 2; resultStr =2; } else if (this.name == "kiss") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =1; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 2; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 2; resultStr =1; } else if (this.name == "worship") { resultBranch = 2; resultStr =2; } else if (this.name == "gasp") { resultBranch = 2; resultStr =0; } else if (this.name == "double-take") { resultBranch = 2; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 2; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =0; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =0; } else if (this.name == "cry") { resultBranch = 8; resultStr =0; } else if (this.name == "bawl") { resultBranch = 8; resultStr =1; } else if (this.name == "bow") { resultBranch = 0; resultStr =0; } else if (this.name == "grovel") { resultBranch = 0; resultStr =1; } else if (this.name == "beg") { resultBranch = 0; resultStr =1; } else if (this.name == "sigh") { resultBranch = 2; resultStr =0; } else if (this.name == "sneer") { resultBranch = 2; resultStr =1; } else if (this.name == "glower") { resultBranch = 2; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 8; resultStr =1; } else if (this.name == "snarl") { resultBranch = 8; resultStr =2; } else if (this.name == "yell") { resultBranch = 8; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 8; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =1; } else if (this.name == "tease") { resultBranch = 2; resultStr =0; } else if (this.name == "taunt") { resultBranch = 2; resultStr =0; } else if (this.name == "shove") { resultBranch = 2; resultStr =1; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 2; resultStr =0; } else if (this.name == "stare") { resultBranch = 2; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 4: // Fear switch(currState.emotionStr) { case 0: // Apprehension ///////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 0; } else if (this.name == "smile") { resultBranch = 15; resultStr =1; } else if (this.name == "grin") { resultBranch = 15; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 15; resultStr =0; } else if (this.name == "laugh") { resultBranch = 15; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =2; } else if (this.name == "wink") { resultBranch = 15; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 0; resultStr =1; } else if (this.name == "flirt") { resultBranch = 0; resultStr =2; } else if (this.name == "admire") { resultBranch = 0; resultStr =2; } else if (this.name == "hug") { resultBranch = 0; resultStr =1; } else if (this.name == "dance") { resultBranch = 0; resultStr =2; } else if (this.name == "kiss") { resultBranch = 0; resultStr =2; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 3; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 3; resultStr =2; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =1; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =2; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =1; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 5; resultStr =0; } else if (this.name == "double-take") { resultBranch = 5; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 5; resultStr =1; } else if (this.name == "frown") { resultBranch = 3; resultStr =0; } else if (this.name == "shake head") { resultBranch = 3; resultStr =1; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =1; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =1; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 4; resultStr =1; } else if (this.name == "snarl") { resultBranch = 4; resultStr =2; } else if (this.name == "yell") { resultBranch = 4; resultStr =2; } else if (this.name == "sigh") { resultBranch = 4; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 4; resultStr =1; } else if (this.name == "tease") { resultBranch = 4; resultStr =0; } else if (this.name == "taunt") { resultBranch = 4; resultStr =1; } else if (this.name == "shove") { resultBranch = 4; resultStr =2; } else if (this.name == "bounce") { resultBranch = 2; resultStr =0; } else if (this.name == "shiver") { resultBranch = 2; resultStr =0; } else if (this.name == "stare") { resultBranch = 2; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 1: // Fear ///////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 0; } else if (this.name == "smile") { resultBranch = 15; resultStr =0; } else if (this.name == "grin") { resultBranch = 15; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 15; resultStr =0; } else if (this.name == "laugh") { resultBranch = 15; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =1; } else if (this.name == "wink") { resultBranch = 15; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 0; resultStr =0; } else if (this.name == "flirt") { resultBranch = 0; resultStr =1; } else if (this.name == "admire") { resultBranch = 0; resultStr =1; } else if (this.name == "hug") { resultBranch = 0; resultStr =1; } else if (this.name == "dance") { resultBranch = 0; resultStr =1; } else if (this.name == "kiss") { resultBranch = 0; resultStr =1; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 3; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 3; resultStr =2; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =1; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =2; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =1; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 5; resultStr =0; } else if (this.name == "double-take") { resultBranch = 5; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 5; resultStr =1; } else if (this.name == "frown") { resultBranch = 3; resultStr =0; } else if (this.name == "shake head") { resultBranch = 3; resultStr =1; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =1; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =1; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 4; resultStr =2; } else if (this.name == "snarl") { resultBranch = 4; resultStr =2; } else if (this.name == "yell") { resultBranch = 4; resultStr =2; } else if (this.name == "sigh") { resultBranch = 4; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 4; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 4; resultStr =2; } else if (this.name == "tease") { resultBranch = 4; resultStr =1; } else if (this.name == "taunt") { resultBranch = 4; resultStr =2; } else if (this.name == "shove") { resultBranch = 4; resultStr =2; } else if (this.name == "bounce") { resultBranch = 2; resultStr =0; } else if (this.name == "shiver") { resultBranch = 2; resultStr =0; } else if (this.name == "stare") { resultBranch = 2; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 2: // Terror /////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 4; resultStr = 0; } else if (this.name == "smile") { resultBranch = 4; resultStr =0; } else if (this.name == "grin") { resultBranch = 4; resultStr = 0; } else if (this.name == "giggle") { resultBranch = 4; resultStr =0; } else if (this.name == "laugh") { resultBranch = 4; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 4; resultStr =0; } else if (this.name == "wink") { resultBranch = 4; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =0; } else if (this.name == "admire") { resultBranch = 1; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =0; } else if (this.name == "dance") { resultBranch = 0; resultStr =0; } else if (this.name == "kiss") { resultBranch = 0; resultStr =0; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 3; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 3; resultStr =1; } else if (this.name == "nod") { resultBranch = 3; resultStr =1; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =1; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =2; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =1; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 5; resultStr =0; } else if (this.name == "double-take") { resultBranch = 5; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 5; resultStr =1; } else if (this.name == "frown") { resultBranch = 3; resultStr =0; } else if (this.name == "shake head") { resultBranch = 3; resultStr =1; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =1; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =1; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 4; resultStr =2; } else if (this.name == "snarl") { resultBranch = 4; resultStr =2; } else if (this.name == "yell") { resultBranch = 4; resultStr =2; } else if (this.name == "sigh") { resultBranch = 4; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 4; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 4; resultStr =2; } else if (this.name == "tease") { resultBranch = 4; resultStr =1; } else if (this.name == "taunt") { resultBranch = 4; resultStr =2; } else if (this.name == "shove") { resultBranch = 4; resultStr =2; } else if (this.name == "bounce") { resultBranch = 2; resultStr =0; } else if (this.name == "shiver") { resultBranch = 2; resultStr =0; } else if (this.name == "stare") { resultBranch = 2; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; } break; case 5: // Awe ///////////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 0; } else if (this.name == "smile") { resultBranch = 15; resultStr =0; } else if (this.name == "grin") { resultBranch = 15; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 15; resultStr =0; } else if (this.name == "laugh") { resultBranch = 15; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =1; } else if (this.name == "wink") { resultBranch = 15; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 0; resultStr =0; } else if (this.name == "flirt") { resultBranch = 0; resultStr =1; } else if (this.name == "admire") { resultBranch = 0; resultStr =1; } else if (this.name == "hug") { resultBranch = 0; resultStr =1; } else if (this.name == "dance") { resultBranch = 0; resultStr =1; } else if (this.name == "kiss") { resultBranch = 0; resultStr =1; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 3; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 3; resultStr =2; } else if (this.name == "nod") { resultBranch = 3; resultStr =0; } else if (this.name == "bow") { resultBranch = 3; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 3; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =1; } else if (this.name == "shiver") { resultBranch = 4; resultStr =1; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =2; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =1; } else if (this.name == "double-take") { resultBranch = 6; resultStr =2; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =1; } else if (this.name == "frown") { resultBranch = 3; resultStr =0; } else if (this.name == "shake head") { resultBranch = 3; resultStr =1; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =1; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =1; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "spit on") { resultBranch = 8; resultStr =2; } else if (this.name == "growl") { resultBranch = 4; resultStr =0; } else if (this.name == "snarl") { resultBranch = 4; resultStr =1; } else if (this.name == "yell") { resultBranch = 4; resultStr =2; } else if (this.name == "sigh") { resultBranch = 4; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 4; resultStr =2; } else if (this.name == "tease") { resultBranch = 4; resultStr =0; } else if (this.name == "taunt") { resultBranch = 4; resultStr =1; } else if (this.name == "shove") { resultBranch = 4; resultStr =2; } else if (this.name == "bounce") { resultBranch = 2; resultStr =0; } else if (this.name == "shiver") { resultBranch = 2; resultStr =0; } else if (this.name == "stare") { resultBranch = 2; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 6: // Surprise switch(currState.emotionStr) { case 0: // distraction /////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 5; resultStr = 0; } else if (this.name == "smile") { resultBranch = 5; resultStr =0; } else if (this.name == "grin") { resultBranch = 5; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 5; resultStr =0; } else if (this.name == "laugh") { resultBranch = 5; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 5; resultStr =1; } else if (this.name == "wink") { resultBranch = 5; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 5; resultStr =0; } else if (this.name == "flirt") { resultBranch = 5; resultStr =1; } else if (this.name == "admire") { resultBranch = 5; resultStr =1; } else if (this.name == "hug") { resultBranch = 5; resultStr =1; } else if (this.name == "dance") { resultBranch = 5; resultStr =1; } else if (this.name == "kiss") { resultBranch = 5; resultStr =1; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "bow") { resultBranch = 0; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 0; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 5; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 5; resultStr =1; } else if (this.name == "shiver") { resultBranch = 5; resultStr =1; } else if (this.name == "whimper") { resultBranch = 5; resultStr =1; } else if (this.name == "gasp") { resultBranch = 5; resultStr =2; } else if (this.name == "scream") { resultBranch = 5; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =2; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =1; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =0; } else if (this.name == "shake head") { resultBranch = 7; resultStr =1; } else if (this.name == "snub") { resultBranch = 7; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 7; resultStr =0; } else if (this.name == "cry") { resultBranch = 7; resultStr =1; } else if (this.name == "bawl") { resultBranch = 7; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 5; resultStr =0; } else if (this.name == "sneer") { resultBranch = 5; resultStr =1; } else if (this.name == "glower") { resultBranch = 5; resultStr =2; } else if (this.name == "snub") { resultBranch = 5; resultStr =1; } else if (this.name == "shove") { resultBranch = 5; resultStr =2; } else if (this.name == "spit on") { resultBranch = 5; resultStr =2; } else if (this.name == "growl") { resultBranch = 7; resultStr =0; } else if (this.name == "snarl") { resultBranch = 7; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =2; } else if (this.name == "sigh") { resultBranch = 7; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =2; } else if (this.name == "tease") { resultBranch = 8; resultStr =0; } else if (this.name == "taunt") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 0; resultStr =0; } else if (this.name == "stare") { resultBranch = 0; resultStr =1; } else if (this.name == "clap") { resultBranch = 0; resultStr =0; } else if (this.name == "cheer") { resultBranch = 0; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 1: // surprise ////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 5; resultStr = 0; } else if (this.name == "smile") { resultBranch = 5; resultStr =1; } else if (this.name == "grin") { resultBranch = 5; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 5; resultStr =0; } else if (this.name == "laugh") { resultBranch = 5; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 5; resultStr =2; } else if (this.name == "wink") { resultBranch = 5; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 5; resultStr =1; } else if (this.name == "flirt") { resultBranch = 5; resultStr =2; } else if (this.name == "admire") { resultBranch = 5; resultStr =2; } else if (this.name == "hug") { resultBranch = 5; resultStr =2; } else if (this.name == "dance") { resultBranch = 5; resultStr =2; } else if (this.name == "kiss") { resultBranch = 5; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =0; } else if (this.name == "nod") { resultBranch = 0; resultStr =1; } else if (this.name == "bow") { resultBranch = 0; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 0; resultStr =1; } else if (this.name == "shifty eyes") { resultBranch = 5; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 5; resultStr =1; } else if (this.name == "shiver") { resultBranch = 5; resultStr =1; } else if (this.name == "whimper") { resultBranch = 5; resultStr =1; } else if (this.name == "gasp") { resultBranch = 5; resultStr =2; } else if (this.name == "scream") { resultBranch = 5; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =2; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =0; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =1; } else if (this.name == "shake head") { resultBranch = 7; resultStr =2; } else if (this.name == "snub") { resultBranch = 7; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 7; resultStr =0; } else if (this.name == "cry") { resultBranch = 7; resultStr =1; } else if (this.name == "bawl") { resultBranch = 7; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =0; } else if (this.name == "grovel") { resultBranch = 6; resultStr =1; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 5; resultStr =1; } else if (this.name == "sneer") { resultBranch = 5; resultStr =2; } else if (this.name == "glower") { resultBranch = 5; resultStr =2; } else if (this.name == "snub") { resultBranch = 5; resultStr =2; } else if (this.name == "shove") { resultBranch = 5; resultStr =2; } else if (this.name == "spit on") { resultBranch = 5; resultStr =2; } else if (this.name == "growl") { resultBranch = 7; resultStr =0; } else if (this.name == "snarl") { resultBranch = 7; resultStr =1; } else if (this.name == "yell") { resultBranch = 7; resultStr =2; } else if (this.name == "sigh") { resultBranch = 7; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =2; } else if (this.name == "tease") { resultBranch = 8; resultStr =0; } else if (this.name == "taunt") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "bounce") { resultBranch = 6; resultStr =1; } else if (this.name == "shiver") { resultBranch = 6; resultStr =1; } else if (this.name == "stare") { resultBranch = 0; resultStr =0; } else if (this.name == "clap") { resultBranch = 6; resultStr =1; } else if (this.name == "cheer") { resultBranch = 0; resultStr =0; } else if (this.name == "high-five") { resultBranch = 0; resultStr =1; } break; case 2: // amazement ///////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 5; resultStr = 0; } else if (this.name == "smile") { resultBranch = 5; resultStr =1; } else if (this.name == "grin") { resultBranch = 5; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 5; resultStr =0; } else if (this.name == "laugh") { resultBranch = 5; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 5; resultStr =2; } else if (this.name == "wink") { resultBranch = 5; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 5; resultStr =1; } else if (this.name == "flirt") { resultBranch = 5; resultStr =2; } else if (this.name == "admire") { resultBranch = 5; resultStr =2; } else if (this.name == "hug") { resultBranch = 5; resultStr =2; } else if (this.name == "dance") { resultBranch = 5; resultStr =2; } else if (this.name == "kiss") { resultBranch = 5; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =0; } else if (this.name == "nod") { resultBranch = 0; resultStr =1; } else if (this.name == "bow") { resultBranch = 0; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 0; resultStr =1; } else if (this.name == "shifty eyes") { resultBranch = 5; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 5; resultStr =1; } else if (this.name == "shiver") { resultBranch = 5; resultStr =1; } else if (this.name == "whimper") { resultBranch = 5; resultStr =1; } else if (this.name == "gasp") { resultBranch = 5; resultStr =2; } else if (this.name == "scream") { resultBranch = 5; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =2; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =0; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =1; } else if (this.name == "shake head") { resultBranch = 7; resultStr =2; } else if (this.name == "snub") { resultBranch = 7; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 7; resultStr =1; } else if (this.name == "cry") { resultBranch = 7; resultStr =2; } else if (this.name == "bawl") { resultBranch = 7; resultStr =2; } else if (this.name == "bow") { resultBranch = 6; resultStr =1; } else if (this.name == "grovel") { resultBranch = 6; resultStr =2; } else if (this.name == "beg") { resultBranch = 6; resultStr =2; } else if (this.name == "sigh") { resultBranch = 5; resultStr =1; } else if (this.name == "sneer") { resultBranch = 5; resultStr =2; } else if (this.name == "glower") { resultBranch = 5; resultStr =2; } else if (this.name == "snub") { resultBranch = 5; resultStr =2; } else if (this.name == "shove") { resultBranch = 5; resultStr =2; } else if (this.name == "spit on") { resultBranch = 5; resultStr =2; } else if (this.name == "growl") { resultBranch = 7; resultStr =1; } else if (this.name == "snarl") { resultBranch = 7; resultStr =2; } else if (this.name == "yell") { resultBranch = 7; resultStr =2; } else if (this.name == "sigh") { resultBranch = 7; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 7; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 7; resultStr =2; } else if (this.name == "tease") { resultBranch = 8; resultStr =0; } else if (this.name == "taunt") { resultBranch = 8; resultStr =1; } else if (this.name == "shove") { resultBranch = 8; resultStr =2; } else if (this.name == "bounce") { resultBranch = 6; resultStr =1; } else if (this.name == "shiver") { resultBranch = 6; resultStr =2; } else if (this.name == "stare") { resultBranch = 6; resultStr =2; } else if (this.name == "clap") { resultBranch = 6; resultStr =1; } else if (this.name == "cheer") { resultBranch = 6; resultStr =1; } else if (this.name == "high-five") { resultBranch = 0; resultStr =0; } break; } break; case 7: // Disapproval if (this.name == "shy smile") { resultBranch = 6; resultStr = 0; } else if (this.name == "smile") { resultBranch = 6; resultStr =1; } else if (this.name == "grin") { resultBranch = 6; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 6; resultStr =0; } else if (this.name == "laugh") { resultBranch = 6; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 6; resultStr =2; } else if (this.name == "wink") { resultBranch = 5; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 5; resultStr =1; } else if (this.name == "flirt") { resultBranch = 5; resultStr =2; } else if (this.name == "admire") { resultBranch = 5; resultStr =2; } else if (this.name == "hug") { resultBranch = 5; resultStr =2; } else if (this.name == "dance") { resultBranch = 5; resultStr =2; } else if (this.name == "kiss") { resultBranch = 5; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "bow") { resultBranch = 0; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 0; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 10; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 10; resultStr =1; } else if (this.name == "shiver") { resultBranch = 10; resultStr =1; } else if (this.name == "whimper") { resultBranch = 10; resultStr =1; } else if (this.name == "gasp") { resultBranch = 10; resultStr =2; } else if (this.name == "scream") { resultBranch = 10; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =2; } else if (this.name == "worship") { resultBranch = 5; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =0; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =1; } else if (this.name == "snub") { resultBranch = 8; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =0; } else if (this.name == "cry") { resultBranch = 8; resultStr =1; } else if (this.name == "bawl") { resultBranch = 8; resultStr =2; } else if (this.name == "bow") { resultBranch = 2; resultStr =0; } else if (this.name == "grovel") { resultBranch = 2; resultStr =1; } else if (this.name == "beg") { resultBranch = 2; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =0; } else if (this.name == "sneer") { resultBranch = 10; resultStr =1; } else if (this.name == "glower") { resultBranch = 10; resultStr =2; } else if (this.name == "snub") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =1; } else if (this.name == "snarl") { resultBranch = 12; resultStr =2; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 6; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 6; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 6; resultStr =2; } else if (this.name == "tease") { resultBranch = 10; resultStr =0; } else if (this.name == "taunt") { resultBranch = 10; resultStr =1; } else if (this.name == "shove") { resultBranch = 10; resultStr =2; } else if (this.name == "bounce") { resultBranch = 6; resultStr =0; } else if (this.name == "shiver") { resultBranch = 6; resultStr =1; } else if (this.name == "stare") { resultBranch = 6; resultStr =2; } else if (this.name == "clap") { resultBranch = 7; resultStr =1; } else if (this.name == "cheer") { resultBranch = 7; resultStr =2; } else if (this.name == "high-five") { resultBranch = 7; resultStr =2; } break; case 8: // Sadness switch(currState.emotionStr) { case 0: // pensiveness ///////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 0; resultStr =0; } else if (this.name == "laugh") { resultBranch = 0; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =1; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =0; } else if (this.name == "admire") { resultBranch = 1; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =1; } else if (this.name == "kiss") { resultBranch = 1; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "bow") { resultBranch = 2; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 2; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 8; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 8; resultStr =1; } else if (this.name == "shiver") { resultBranch = 8; resultStr =1; } else if (this.name == "whimper") { resultBranch = 8; resultStr =1; } else if (this.name == "gasp") { resultBranch = 8; resultStr =2; } else if (this.name == "scream") { resultBranch = 8; resultStr =2; } else if (this.name == "stare") { resultBranch = 7; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 7; resultStr =0; } else if (this.name == "worship") { resultBranch = 7; resultStr =1; } else if (this.name == "gasp") { resultBranch = 7; resultStr =0; } else if (this.name == "double-take") { resultBranch = 7; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 7; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =0; } else if (this.name == "shake head") { resultBranch = 7; resultStr =1; } else if (this.name == "snub") { resultBranch = 7; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =1; } else if (this.name == "cry") { resultBranch = 8; resultStr =1; } else if (this.name == "bawl") { resultBranch = 8; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =0; } else if (this.name == "beg") { resultBranch = 9; resultStr =1; } else if (this.name == "sigh") { resultBranch = 9; resultStr =0; } else if (this.name == "sneer") { resultBranch = 9; resultStr =1; } else if (this.name == "glower") { resultBranch = 9; resultStr =2; } else if (this.name == "snub") { resultBranch = 10; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 10; resultStr =1; } else if (this.name == "snarl") { resultBranch = 10; resultStr =2; } else if (this.name == "yell") { resultBranch = 10; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 11; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =1; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =1; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "bounce") { resultBranch = 7; resultStr =0; } else if (this.name == "shiver") { resultBranch = 7; resultStr =1; } else if (this.name == "stare") { resultBranch = 6; resultStr =0; } else if (this.name == "clap") { resultBranch = 6; resultStr =0; } else if (this.name == "cheer") { resultBranch = 6; resultStr =1; } else if (this.name == "high-five") { resultBranch = 6; resultStr =1; } break; case 1: // sadness ///////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 8; resultStr = 0; } else if (this.name == "smile") { resultBranch = 8; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 0; } else if (this.name == "giggle") { resultBranch = 8; resultStr =0; } else if (this.name == "laugh") { resultBranch = 8; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =0; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =0; } else if (this.name == "admire") { resultBranch = 1; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =1; } else if (this.name == "kiss") { resultBranch = 1; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "bow") { resultBranch = 2; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 2; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 8; resultStr =2; } else if (this.name == "bite lip") { resultBranch = 8; resultStr =2; } else if (this.name == "shiver") { resultBranch = 8; resultStr =2; } else if (this.name == "whimper") { resultBranch = 8; resultStr =2; } else if (this.name == "gasp") { resultBranch = 8; resultStr =2; } else if (this.name == "scream") { resultBranch = 8; resultStr =2; } else if (this.name == "stare") { resultBranch = 7; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 7; resultStr =1; } else if (this.name == "worship") { resultBranch = 7; resultStr =2; } else if (this.name == "gasp") { resultBranch = 7; resultStr =0; } else if (this.name == "double-take") { resultBranch = 7; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 7; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =0; } else if (this.name == "shake head") { resultBranch = 7; resultStr =1; } else if (this.name == "snub") { resultBranch = 7; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =2; } else if (this.name == "cry") { resultBranch = 8; resultStr =2; } else if (this.name == "bawl") { resultBranch = 8; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =0; } else if (this.name == "beg") { resultBranch = 9; resultStr =0; } else if (this.name == "sigh") { resultBranch = 9; resultStr =0; } else if (this.name == "sneer") { resultBranch = 9; resultStr =0; } else if (this.name == "glower") { resultBranch = 9; resultStr =1; } else if (this.name == "snub") { resultBranch = 10; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =0; } else if (this.name == "spit on") { resultBranch = 10; resultStr =1; } else if (this.name == "growl") { resultBranch = 10; resultStr =0; } else if (this.name == "snarl") { resultBranch = 10; resultStr =1; } else if (this.name == "yell") { resultBranch = 10; resultStr =1; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 11; resultStr =0; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =0; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =1; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "bounce") { resultBranch = 7; resultStr =0; } else if (this.name == "shiver") { resultBranch = 7; resultStr =1; } else if (this.name == "stare") { resultBranch = 6; resultStr =0; } else if (this.name == "clap") { resultBranch = 6; resultStr =0; } else if (this.name == "cheer") { resultBranch = 6; resultStr =1; } else if (this.name == "high-five") { resultBranch = 6; resultStr =1; } break; case 2: // grief /////////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 8; resultStr = 1; } else if (this.name == "smile") { resultBranch = 8; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 0; } else if (this.name == "giggle") { resultBranch = 8; resultStr =1; } else if (this.name == "laugh") { resultBranch = 8; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =0; } else if (this.name == "wink") { resultBranch = 8; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 8; resultStr =0; } else if (this.name == "flirt") { resultBranch = 8; resultStr =0; } else if (this.name == "admire") { resultBranch = 0; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =0; } else if (this.name == "dance") { resultBranch = 1; resultStr =0; } else if (this.name == "kiss") { resultBranch = 1; resultStr =0; } else if (this.name == "nod") { resultBranch = 8; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =0; } else if (this.name == "nod") { resultBranch = 8; resultStr =0; } else if (this.name == "bow") { resultBranch = 8; resultStr =0; } else if (this.name == "prostrate") { resultBranch = 2; resultStr =0; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =2; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =2; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =2; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 7; resultStr =2; } else if (this.name == "jaw drop") { resultBranch = 7; resultStr =2; } else if (this.name == "worship") { resultBranch = 7; resultStr =2; } else if (this.name == "gasp") { resultBranch = 7; resultStr =2; } else if (this.name == "double-take") { resultBranch = 7; resultStr =2; } else if (this.name == "eye-pop") { resultBranch = 7; resultStr =2; } else if (this.name == "frown") { resultBranch = 7; resultStr =2; } else if (this.name == "shake head") { resultBranch = 7; resultStr =2; } else if (this.name == "snub") { resultBranch = 7; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =2; } else if (this.name == "cry") { resultBranch = 8; resultStr =2; } else if (this.name == "bawl") { resultBranch = 8; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =1; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =0; } else if (this.name == "sigh") { resultBranch = 9; resultStr =0; } else if (this.name == "sneer") { resultBranch = 10; resultStr =1; } else if (this.name == "glower") { resultBranch = 10; resultStr =2; } else if (this.name == "snub") { resultBranch = 10; resultStr =1; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =2; } else if (this.name == "snarl") { resultBranch = 12; resultStr =2; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =2; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 12; resultStr =2; } else if (this.name == "tease") { resultBranch = 11; resultStr =2; } else if (this.name == "taunt") { resultBranch = 11; resultStr =2; } else if (this.name == "shove") { resultBranch = 11; resultStr =2; } else if (this.name == "bounce") { resultBranch = 7; resultStr =0; } else if (this.name == "shiver") { resultBranch = 7; resultStr =1; } else if (this.name == "stare") { resultBranch = 7; resultStr =0; } else if (this.name == "clap") { resultBranch = 7; resultStr =0; } else if (this.name == "cheer") { resultBranch = 7; resultStr =1; } else if (this.name == "high-five") { resultBranch = 7; resultStr =1; } break; } break; case 9: // Remorse if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 0; resultStr =0; } else if (this.name == "laugh") { resultBranch = 0; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =1; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =0; } else if (this.name == "admire") { resultBranch = 1; resultStr =1; } else if (this.name == "hug") { resultBranch = 1; resultStr =0; } else if (this.name == "dance") { resultBranch = 1; resultStr =0; } else if (this.name == "kiss") { resultBranch = 1; resultStr =1; } else if (this.name == "nod") { resultBranch = 0; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "bow") { resultBranch = 0; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 0; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 3; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 3; resultStr =1; } else if (this.name == "shiver") { resultBranch = 3; resultStr =2; } else if (this.name == "whimper") { resultBranch = 3; resultStr =0; } else if (this.name == "gasp") { resultBranch = 3; resultStr =1; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 5; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 5; resultStr =0; } else if (this.name == "worship") { resultBranch = 5; resultStr =1; } else if (this.name == "gasp") { resultBranch = 5; resultStr =0; } else if (this.name == "double-take") { resultBranch = 5; resultStr =0; } else if (this.name == "eye-pop") { resultBranch = 5; resultStr =1; } else if (this.name == "frown") { resultBranch = 8; resultStr =0; } else if (this.name == "shake head") { resultBranch = 8; resultStr =1; } else if (this.name == "snub") { resultBranch = 8; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 8; resultStr =1; } else if (this.name == "cry") { resultBranch = 8; resultStr =1; } else if (this.name == "bawl") { resultBranch = 8; resultStr =2; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 15; resultStr =1; } else if (this.name == "beg") { resultBranch = 15; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =0; } else if (this.name == "sneer") { resultBranch = 10; resultStr =1; } else if (this.name == "glower") { resultBranch = 10; resultStr =2; } else if (this.name == "snub") { resultBranch = 10; resultStr =0; } else if (this.name == "shove") { resultBranch = 10; resultStr =1; } else if (this.name == "spit on") { resultBranch = 10; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =0; } else if (this.name == "snarl") { resultBranch = 12; resultStr =1; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 12; resultStr =2; } else if (this.name == "tease") { resultBranch = 11; resultStr =0; } else if (this.name == "taunt") { resultBranch = 11; resultStr =1; } else if (this.name == "shove") { resultBranch = 11; resultStr =2; } else if (this.name == "bounce") { resultBranch = 0; resultStr =0; } else if (this.name == "shiver") { resultBranch = 0; resultStr =1; } else if (this.name == "stare") { resultBranch = 0; resultStr =2; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =2; } break; case 10: // Disgust switch(currState.emotionStr) { case 0: // boredom ////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =0; } else if (this.name == "grin") { resultBranch = 0; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 0; resultStr =0; } else if (this.name == "laugh") { resultBranch = 0; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =1; } else if (this.name == "wink") { resultBranch = 15; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 15; resultStr =0; } else if (this.name == "flirt") { resultBranch = 15; resultStr =0; } else if (this.name == "admire") { resultBranch = 15; resultStr =1; } else if (this.name == "hug") { resultBranch = 15; resultStr =0; } else if (this.name == "dance") { resultBranch = 15; resultStr =0; } else if (this.name == "kiss") { resultBranch = 15; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "bow") { resultBranch = 2; resultStr =0; } else if (this.name == "prostrate") { resultBranch = 2; resultStr =1; } else if (this.name == "shifty eyes") { resultBranch = 10; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 10; resultStr =1; } else if (this.name == "shiver") { resultBranch = 10; resultStr =2; } else if (this.name == "whimper") { resultBranch = 10; resultStr =0; } else if (this.name == "gasp") { resultBranch = 10; resultStr =1; } else if (this.name == "scream") { resultBranch = 10; resultStr =2; } else if (this.name == "stare") { resultBranch = 11; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 11; resultStr =0; } else if (this.name == "worship") { resultBranch = 11; resultStr =1; } else if (this.name == "gasp") { resultBranch = 7; resultStr =0; } else if (this.name == "double-take") { resultBranch = 7; resultStr =0; } else if (this.name == "eye-pop") { resultBranch = 7; resultStr =1; } else if (this.name == "frown") { resultBranch = 9; resultStr =0; } else if (this.name == "shake head") { resultBranch = 9; resultStr =1; } else if (this.name == "snub") { resultBranch = 9; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =1; } else if (this.name == "bawl") { resultBranch = 9; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =1; } else if (this.name == "sneer") { resultBranch = 10; resultStr =2; } else if (this.name == "glower") { resultBranch = 10; resultStr =2; } else if (this.name == "snub") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 11; resultStr =0; } else if (this.name == "snarl") { resultBranch = 11; resultStr =1; } else if (this.name == "yell") { resultBranch = 11; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 11; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 12; resultStr =0; } else if (this.name == "taunt") { resultBranch = 12; resultStr =0; } else if (this.name == "shove") { resultBranch = 12; resultStr =1; } else if (this.name == "bounce") { resultBranch = 13; resultStr =0; } else if (this.name == "shiver") { resultBranch = 13; resultStr =0; } else if (this.name == "stare") { resultBranch = 13; resultStr =1; } else if (this.name == "clap") { resultBranch = 14; resultStr =0; } else if (this.name == "cheer") { resultBranch = 14; resultStr =0; } else if (this.name == "high-five") { resultBranch = 14; resultStr =1; } break; case 1: // Disgust ////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 9; resultStr = 0; } else if (this.name == "smile") { resultBranch = 9; resultStr =0; } else if (this.name == "grin") { resultBranch = 9; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 9; resultStr =0; } else if (this.name == "laugh") { resultBranch = 9; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 9; resultStr =1; } else if (this.name == "wink") { resultBranch = 8; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 8; resultStr =0; } else if (this.name == "flirt") { resultBranch = 8; resultStr =0; } else if (this.name == "admire") { resultBranch = 8; resultStr =1; } else if (this.name == "hug") { resultBranch = 8; resultStr =0; } else if (this.name == "dance") { resultBranch = 8; resultStr =0; } else if (this.name == "kiss") { resultBranch = 8; resultStr =1; } else if (this.name == "nod") { resultBranch = 9; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 9; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 9; resultStr =1; } else if (this.name == "nod") { resultBranch = 9; resultStr =0; } else if (this.name == "bow") { resultBranch = 9; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 9; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 10; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 10; resultStr =1; } else if (this.name == "shiver") { resultBranch = 10; resultStr =2; } else if (this.name == "whimper") { resultBranch = 10; resultStr =1; } else if (this.name == "gasp") { resultBranch = 10; resultStr =1; } else if (this.name == "scream") { resultBranch = 10; resultStr =2; } else if (this.name == "stare") { resultBranch = 11; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 11; resultStr =0; } else if (this.name == "worship") { resultBranch = 11; resultStr =1; } else if (this.name == "gasp") { resultBranch = 6; resultStr =0; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 11; resultStr =0; } else if (this.name == "shake head") { resultBranch = 11; resultStr =1; } else if (this.name == "snub") { resultBranch = 11; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =1; } else if (this.name == "bawl") { resultBranch = 9; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =2; } else if (this.name == "sneer") { resultBranch = 10; resultStr =2; } else if (this.name == "glower") { resultBranch = 11; resultStr =1; } else if (this.name == "snub") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 11; resultStr =0; } else if (this.name == "snarl") { resultBranch = 11; resultStr =1; } else if (this.name == "yell") { resultBranch = 11; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 11; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 12; resultStr =0; } else if (this.name == "taunt") { resultBranch = 12; resultStr =0; } else if (this.name == "shove") { resultBranch = 12; resultStr =1; } else if (this.name == "bounce") { resultBranch = 13; resultStr =0; } else if (this.name == "shiver") { resultBranch = 13; resultStr =0; } else if (this.name == "stare") { resultBranch = 13; resultStr =1; } else if (this.name == "clap") { resultBranch = 14; resultStr =0; } else if (this.name == "cheer") { resultBranch = 14; resultStr =0; } else if (this.name == "high-five") { resultBranch = 14; resultStr =1; } break; case 2: // Loathing ///////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 9; resultStr = 0; } else if (this.name == "smile") { resultBranch = 9; resultStr =1; } else if (this.name == "grin") { resultBranch = 9; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 9; resultStr =0; } else if (this.name == "laugh") { resultBranch = 9; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 9; resultStr =1; } else if (this.name == "wink") { resultBranch = 8; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 8; resultStr =0; } else if (this.name == "flirt") { resultBranch = 8; resultStr =1; } else if (this.name == "admire") { resultBranch = 8; resultStr =1; } else if (this.name == "hug") { resultBranch = 8; resultStr =0; } else if (this.name == "dance") { resultBranch = 8; resultStr =0; } else if (this.name == "kiss") { resultBranch = 8; resultStr =0; } else if (this.name == "nod") { resultBranch = 9; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 9; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 9; resultStr =2; } else if (this.name == "nod") { resultBranch = 9; resultStr =0; } else if (this.name == "bow") { resultBranch = 9; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 9; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 10; resultStr =2; } else if (this.name == "bite lip") { resultBranch = 10; resultStr =2; } else if (this.name == "shiver") { resultBranch = 10; resultStr =2; } else if (this.name == "whimper") { resultBranch = 10; resultStr =2; } else if (this.name == "gasp") { resultBranch = 11; resultStr =1; } else if (this.name == "scream") { resultBranch = 11; resultStr =2; } else if (this.name == "stare") { resultBranch = 12; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 12; resultStr =1; } else if (this.name == "worship") { resultBranch = 12; resultStr =2; } else if (this.name == "gasp") { resultBranch = 7; resultStr =0; } else if (this.name == "double-take") { resultBranch = 7; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 7; resultStr =2; } else if (this.name == "frown") { resultBranch = 12; resultStr =0; } else if (this.name == "shake head") { resultBranch = 12; resultStr =1; } else if (this.name == "snub") { resultBranch = 12; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =0; } else if (this.name == "bawl") { resultBranch = 9; resultStr =1; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =2; } else if (this.name == "sneer") { resultBranch = 10; resultStr =2; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 11; resultStr =1; } else if (this.name == "shove") { resultBranch = 11; resultStr =2; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 11; resultStr =1; } else if (this.name == "snarl") { resultBranch = 11; resultStr =2; } else if (this.name == "yell") { resultBranch = 11; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 11; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 12; resultStr =0; } else if (this.name == "taunt") { resultBranch = 12; resultStr =1; } else if (this.name == "shove") { resultBranch = 12; resultStr =2; } else if (this.name == "bounce") { resultBranch = 13; resultStr =0; } else if (this.name == "shiver") { resultBranch = 13; resultStr =1; } else if (this.name == "stare") { resultBranch = 13; resultStr =2; } else if (this.name == "clap") { resultBranch = 14; resultStr =0; } else if (this.name == "cheer") { resultBranch = 14; resultStr =1; } else if (this.name == "high-five") { resultBranch = 14; resultStr =2; } break; } break; case 11: // Contempt /////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 13; resultStr = 0; } else if (this.name == "smile") { resultBranch = 13; resultStr =1; } else if (this.name == "grin") { resultBranch = 13; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 13; resultStr =0; } else if (this.name == "laugh") { resultBranch = 13; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 13; resultStr =1; } else if (this.name == "wink") { resultBranch = 8; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 8; resultStr =0; } else if (this.name == "flirt") { resultBranch = 8; resultStr =1; } else if (this.name == "admire") { resultBranch = 8; resultStr =1; } else if (this.name == "hug") { resultBranch = 8; resultStr =0; } else if (this.name == "dance") { resultBranch = 8; resultStr =1; } else if (this.name == "kiss") { resultBranch = 8; resultStr =1; } else if (this.name == "nod") { resultBranch = 6; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 6; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 6; resultStr =2; } else if (this.name == "nod") { resultBranch = 5; resultStr =0; } else if (this.name == "bow") { resultBranch = 5; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 12; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 12; resultStr =1; } else if (this.name == "shiver") { resultBranch = 12; resultStr =2; } else if (this.name == "whimper") { resultBranch = 12; resultStr =0; } else if (this.name == "gasp") { resultBranch = 12; resultStr =1; } else if (this.name == "scream") { resultBranch = 12; resultStr =2; } else if (this.name == "stare") { resultBranch = 15; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 15; resultStr =1; } else if (this.name == "worship") { resultBranch = 15; resultStr =2; } else if (this.name == "gasp") { resultBranch = 14; resultStr =0; } else if (this.name == "double-take") { resultBranch = 14; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 10; resultStr =0; } else if (this.name == "shake head") { resultBranch = 10; resultStr =1; } else if (this.name == "snub") { resultBranch = 10; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 7; resultStr =0; } else if (this.name == "cry") { resultBranch = 7; resultStr =1; } else if (this.name == "bawl") { resultBranch = 7; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =2; } else if (this.name == "sigh") { resultBranch = 10; resultStr =0; } else if (this.name == "sneer") { resultBranch = 10; resultStr =1; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 11; resultStr =0; } else if (this.name == "shove") { resultBranch = 11; resultStr =1; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =0; } else if (this.name == "snarl") { resultBranch = 12; resultStr =1; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 12; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =1; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 10; resultStr =0; } else if (this.name == "shiver") { resultBranch = 10; resultStr =1; } else if (this.name == "stare") { resultBranch = 10; resultStr =2; } else if (this.name == "clap") { resultBranch = 6; resultStr =0; } else if (this.name == "cheer") { resultBranch = 6; resultStr =1; } else if (this.name == "high-five") { resultBranch = 6; resultStr =2; } break; case 12: // Anger switch(currState.emotionStr) { case 0: // Annoyance /////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 8; resultStr = 0; } else if (this.name == "smile") { resultBranch = 8; resultStr =0; } else if (this.name == "grin") { resultBranch = 8; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 8; resultStr =0; } else if (this.name == "laugh") { resultBranch = 8; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 8; resultStr =1; } else if (this.name == "wink") { resultBranch = 9; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 9; resultStr =0; } else if (this.name == "flirt") { resultBranch = 9; resultStr =1; } else if (this.name == "admire") { resultBranch = 9; resultStr =1; } else if (this.name == "hug") { resultBranch = 9; resultStr =0; } else if (this.name == "dance") { resultBranch = 9; resultStr =1; } else if (this.name == "kiss") { resultBranch = 9; resultStr =1; } else if (this.name == "nod") { resultBranch = 6; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 6; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 6; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =0; } else if (this.name == "bow") { resultBranch = 6; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =1; } else if (this.name == "shifty eyes") { resultBranch = 12; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 12; resultStr =1; } else if (this.name == "shiver") { resultBranch = 12; resultStr =2; } else if (this.name == "whimper") { resultBranch = 12; resultStr =1; } else if (this.name == "gasp") { resultBranch = 12; resultStr =1; } else if (this.name == "scream") { resultBranch = 12; resultStr =2; } else if (this.name == "stare") { resultBranch = 13; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 13; resultStr =0; } else if (this.name == "worship") { resultBranch = 13; resultStr =1; } else if (this.name == "gasp") { resultBranch = 13; resultStr =0; } else if (this.name == "double-take") { resultBranch = 14; resultStr =0; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =1; } else if (this.name == "frown") { resultBranch = 14; resultStr =1; } else if (this.name == "shake head") { resultBranch = 14; resultStr =2; } else if (this.name == "snub") { resultBranch = 14; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =1; } else if (this.name == "bawl") { resultBranch = 9; resultStr =2; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =1; } else if (this.name == "beg") { resultBranch = 9; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "sneer") { resultBranch = 11; resultStr =1; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 12; resultStr =1; } else if (this.name == "shove") { resultBranch = 12; resultStr =1; } else if (this.name == "spit on") { resultBranch = 12; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =1; } else if (this.name == "snarl") { resultBranch = 12; resultStr =1; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 12; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =1; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =1; } else if (this.name == "stare") { resultBranch = 15; resultStr =2; } else if (this.name == "clap") { resultBranch = 12; resultStr =0; } else if (this.name == "cheer") { resultBranch = 12; resultStr =1; } else if (this.name == "high-five") { resultBranch = 12; resultStr =2; } break; case 1: // Anger /////////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 8; resultStr = 0; } else if (this.name == "smile") { resultBranch = 8; resultStr =1; } else if (this.name == "grin") { resultBranch = 8; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 8; resultStr =0; } else if (this.name == "laugh") { resultBranch = 8; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 8; resultStr =2; } else if (this.name == "wink") { resultBranch = 9; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 9; resultStr =0; } else if (this.name == "flirt") { resultBranch = 9; resultStr =1; } else if (this.name == "admire") { resultBranch = 9; resultStr =1; } else if (this.name == "hug") { resultBranch = 9; resultStr =2; } else if (this.name == "dance") { resultBranch = 9; resultStr =2; } else if (this.name == "kiss") { resultBranch = 9; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 6; resultStr =2; } else if (this.name == "shake hands") { resultBranch = 6; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =1; } else if (this.name == "bow") { resultBranch = 5; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 12; resultStr =2; } else if (this.name == "bite lip") { resultBranch = 12; resultStr =2; } else if (this.name == "shiver") { resultBranch = 10; resultStr =2; } else if (this.name == "whimper") { resultBranch = 10; resultStr =1; } else if (this.name == "gasp") { resultBranch = 10; resultStr =1; } else if (this.name == "scream") { resultBranch = 10; resultStr =2; } else if (this.name == "stare") { resultBranch = 13; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 13; resultStr =1; } else if (this.name == "worship") { resultBranch = 13; resultStr =2; } else if (this.name == "gasp") { resultBranch = 13; resultStr =0; } else if (this.name == "double-take") { resultBranch = 14; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 14; resultStr =2; } else if (this.name == "shake head") { resultBranch = 14; resultStr =2; } else if (this.name == "snub") { resultBranch = 14; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =0; } else if (this.name == "bawl") { resultBranch = 9; resultStr =1; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =0; } else if (this.name == "beg") { resultBranch = 9; resultStr =1; } else if (this.name == "sigh") { resultBranch = 11; resultStr =1; } else if (this.name == "sneer") { resultBranch = 11; resultStr =2; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 12; resultStr =2; } else if (this.name == "shove") { resultBranch = 12; resultStr =2; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =2; } else if (this.name == "snarl") { resultBranch = 12; resultStr =2; } else if (this.name == "yell") { resultBranch = 11; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =2; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =1; } else if (this.name == "taunt") { resultBranch = 13; resultStr =2; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 15; resultStr =0; } else if (this.name == "shiver") { resultBranch = 15; resultStr =1; } else if (this.name == "stare") { resultBranch = 15; resultStr =2; } else if (this.name == "clap") { resultBranch = 12; resultStr =0; } else if (this.name == "cheer") { resultBranch = 12; resultStr =1; } else if (this.name == "high-five") { resultBranch = 12; resultStr =2; } break; case 2: // Rage //////////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 8; resultStr = 0; } else if (this.name == "smile") { resultBranch = 8; resultStr =1; } else if (this.name == "grin") { resultBranch = 8; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 8; resultStr =0; } else if (this.name == "laugh") { resultBranch = 8; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 8; resultStr =2; } else if (this.name == "wink") { resultBranch = 9; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 9; resultStr =0; } else if (this.name == "flirt") { resultBranch = 9; resultStr =1; } else if (this.name == "admire") { resultBranch = 9; resultStr =1; } else if (this.name == "hug") { resultBranch = 9; resultStr =2; } else if (this.name == "dance") { resultBranch = 9; resultStr =2; } else if (this.name == "kiss") { resultBranch = 9; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 6; resultStr =2; } else if (this.name == "shake hands") { resultBranch = 6; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =1; } else if (this.name == "bow") { resultBranch = 5; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 12; resultStr =2; } else if (this.name == "bite lip") { resultBranch = 12; resultStr =2; } else if (this.name == "shiver") { resultBranch = 10; resultStr =2; } else if (this.name == "whimper") { resultBranch = 10; resultStr =1; } else if (this.name == "gasp") { resultBranch = 10; resultStr =1; } else if (this.name == "scream") { resultBranch = 10; resultStr =2; } else if (this.name == "stare") { resultBranch = 13; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 13; resultStr =1; } else if (this.name == "worship") { resultBranch = 13; resultStr =2; } else if (this.name == "gasp") { resultBranch = 13; resultStr =0; } else if (this.name == "double-take") { resultBranch = 14; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 14; resultStr =2; } else if (this.name == "shake head") { resultBranch = 14; resultStr =2; } else if (this.name == "snub") { resultBranch = 14; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 9; resultStr =0; } else if (this.name == "bawl") { resultBranch = 9; resultStr =1; } else if (this.name == "bow") { resultBranch = 9; resultStr =0; } else if (this.name == "grovel") { resultBranch = 9; resultStr =0; } else if (this.name == "beg") { resultBranch = 9; resultStr =1; } else if (this.name == "sigh") { resultBranch = 11; resultStr =1; } else if (this.name == "sneer") { resultBranch = 11; resultStr =2; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 12; resultStr =2; } else if (this.name == "shove") { resultBranch = 12; resultStr =2; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =2; } else if (this.name == "snarl") { resultBranch = 12; resultStr =2; } else if (this.name == "yell") { resultBranch = 11; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =2; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =1; } else if (this.name == "taunt") { resultBranch = 13; resultStr =2; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 15; resultStr =1; } else if (this.name == "shiver") { resultBranch = 15; resultStr =2; } else if (this.name == "stare") { resultBranch = 15; resultStr =2; } else if (this.name == "clap") { resultBranch = 12; resultStr =1; } else if (this.name == "cheer") { resultBranch = 12; resultStr =2; } else if (this.name == "high-five") { resultBranch = 12; resultStr =2; } break; } break; case 13: // Aggressiveness /////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 14; resultStr = 0; } else if (this.name == "smile") { resultBranch = 14; resultStr =1; } else if (this.name == "grin") { resultBranch = 14; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 14; resultStr =0; } else if (this.name == "laugh") { resultBranch = 14; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 14; resultStr =2; } else if (this.name == "wink") { resultBranch = 15; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 15; resultStr =0; } else if (this.name == "flirt") { resultBranch = 15; resultStr =1; } else if (this.name == "admire") { resultBranch = 15; resultStr =1; } else if (this.name == "hug") { resultBranch = 15; resultStr =2; } else if (this.name == "dance") { resultBranch = 15; resultStr =2; } else if (this.name == "kiss") { resultBranch = 15; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 6; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 6; resultStr =2; } else if (this.name == "nod") { resultBranch = 6; resultStr =0; } else if (this.name == "bow") { resultBranch = 5; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 12; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 12; resultStr =1; } else if (this.name == "shiver") { resultBranch = 12; resultStr =2; } else if (this.name == "whimper") { resultBranch = 12; resultStr =0; } else if (this.name == "gasp") { resultBranch = 12; resultStr =1; } else if (this.name == "scream") { resultBranch = 12; resultStr =2; } else if (this.name == "stare") { resultBranch = 2; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 2; resultStr =1; } else if (this.name == "worship") { resultBranch = 2; resultStr =2; } else if (this.name == "gasp") { resultBranch = 14; resultStr =0; } else if (this.name == "double-take") { resultBranch = 14; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 10; resultStr =0; } else if (this.name == "shake head") { resultBranch = 10; resultStr =1; } else if (this.name == "snub") { resultBranch = 10; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 9; resultStr =0; } else if (this.name == "cry") { resultBranch = 10; resultStr =1; } else if (this.name == "bawl") { resultBranch = 10; resultStr =2; } else if (this.name == "bow") { resultBranch = 15; resultStr =0; } else if (this.name == "grovel") { resultBranch = 15; resultStr =1; } else if (this.name == "beg") { resultBranch = 15; resultStr =2; } else if (this.name == "sigh") { resultBranch = 11; resultStr =0; } else if (this.name == "sneer") { resultBranch = 11; resultStr =1; } else if (this.name == "glower") { resultBranch = 11; resultStr =2; } else if (this.name == "snub") { resultBranch = 12; resultStr =0; } else if (this.name == "shove") { resultBranch = 12; resultStr =1; } else if (this.name == "spit on") { resultBranch = 11; resultStr =2; } else if (this.name == "growl") { resultBranch = 12; resultStr =0; } else if (this.name == "snarl") { resultBranch = 12; resultStr =1; } else if (this.name == "yell") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 12; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 12; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 11; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =1; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 14; resultStr =0; } else if (this.name == "shiver") { resultBranch = 14; resultStr =1; } else if (this.name == "stare") { resultBranch = 14; resultStr =2; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =2; } break; case 14: // Interest switch(currState.emotionStr) { case 0: // Interest /////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 0; } else if (this.name == "smile") { resultBranch = 15; resultStr =0; } else if (this.name == "grin") { resultBranch = 15; resultStr = 1; } else if (this.name == "giggle") { resultBranch = 15; resultStr =0; } else if (this.name == "laugh") { resultBranch = 15; resultStr =0; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =1; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =0; } else if (this.name == "flirt") { resultBranch = 1; resultStr =0; } else if (this.name == "admire") { resultBranch = 1; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =0; } else if (this.name == "dance") { resultBranch = 1; resultStr =1; } else if (this.name == "kiss") { resultBranch = 1; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =0; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =1; } else if (this.name == "nod") { resultBranch = 15; resultStr =0; } else if (this.name == "bow") { resultBranch = 15; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 15; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =0; } else if (this.name == "shiver") { resultBranch = 4; resultStr =1; } else if (this.name == "whimper") { resultBranch = 4; resultStr =0; } else if (this.name == "gasp") { resultBranch = 4; resultStr =0; } else if (this.name == "scream") { resultBranch = 4; resultStr =1; } else if (this.name == "stare") { resultBranch = 6; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 6; resultStr =0; } else if (this.name == "worship") { resultBranch = 6; resultStr =1; } else if (this.name == "gasp") { resultBranch = 14; resultStr =1; } else if (this.name == "double-take") { resultBranch = 14; resultStr =2; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 4; resultStr =0; } else if (this.name == "shake head") { resultBranch = 4; resultStr =0; } else if (this.name == "snub") { resultBranch = 4; resultStr =1; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =0; } else if (this.name == "bawl") { resultBranch = 3; resultStr =1; } else if (this.name == "bow") { resultBranch = 13; resultStr =0; } else if (this.name == "grovel") { resultBranch = 13; resultStr =0; } else if (this.name == "beg") { resultBranch = 13; resultStr =1; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =0; } else if (this.name == "glower") { resultBranch = 8; resultStr =1; } else if (this.name == "snub") { resultBranch = 7; resultStr =0; } else if (this.name == "shove") { resultBranch = 7; resultStr =0; } else if (this.name == "spit on") { resultBranch = 7; resultStr =1; } else if (this.name == "growl") { resultBranch = 13; resultStr =0; } else if (this.name == "snarl") { resultBranch = 13; resultStr =0; } else if (this.name == "yell") { resultBranch = 13; resultStr =1; } else if (this.name == "sigh") { resultBranch = 13; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 13; resultStr =0; } else if (this.name == "cold shoulder") { resultBranch = 13; resultStr =1; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =0; } else if (this.name == "shove") { resultBranch = 13; resultStr =1; } else if (this.name == "bounce") { resultBranch = 14; resultStr =1; } else if (this.name == "shiver") { resultBranch = 14; resultStr =1; } else if (this.name == "stare") { resultBranch = 14; resultStr =2; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =0; } else if (this.name == "high-five") { resultBranch = 15; resultStr =1; } break; case 1: // Anticipation /////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 0; } else if (this.name == "smile") { resultBranch = 15; resultStr =1; } else if (this.name == "grin") { resultBranch = 15; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 15; resultStr =0; } else if (this.name == "laugh") { resultBranch = 15; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =1; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =0; } else if (this.name == "hug") { resultBranch = 1; resultStr =1; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =1; } else if (this.name == "nod") { resultBranch = 2; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 15; resultStr =0; } else if (this.name == "bow") { resultBranch = 15; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 15; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =1; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =0; } else if (this.name == "gasp") { resultBranch = 4; resultStr =1; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 6; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 6; resultStr =1; } else if (this.name == "worship") { resultBranch = 6; resultStr =2; } else if (this.name == "gasp") { resultBranch = 14; resultStr =1; } else if (this.name == "double-take") { resultBranch = 14; resultStr =2; } else if (this.name == "eye-pop") { resultBranch = 14; resultStr =2; } else if (this.name == "frown") { resultBranch = 4; resultStr =0; } else if (this.name == "shake head") { resultBranch = 4; resultStr =1; } else if (this.name == "snub") { resultBranch = 4; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =0; } else if (this.name == "cry") { resultBranch = 3; resultStr =1; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 13; resultStr =0; } else if (this.name == "grovel") { resultBranch = 13; resultStr =1; } else if (this.name == "beg") { resultBranch = 13; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =0; } else if (this.name == "sneer") { resultBranch = 8; resultStr =1; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 7; resultStr =0; } else if (this.name == "shove") { resultBranch = 7; resultStr =1; } else if (this.name == "spit on") { resultBranch = 7; resultStr =2; } else if (this.name == "growl") { resultBranch = 13; resultStr =0; } else if (this.name == "snarl") { resultBranch = 13; resultStr =1; } else if (this.name == "yell") { resultBranch = 13; resultStr =2; } else if (this.name == "sigh") { resultBranch = 13; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 13; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 13; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =1; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 14; resultStr =2; } else if (this.name == "shiver") { resultBranch = 14; resultStr =2; } else if (this.name == "stare") { resultBranch = 13; resultStr =2; } else if (this.name == "clap") { resultBranch = 15; resultStr =0; } else if (this.name == "cheer") { resultBranch = 15; resultStr =1; } else if (this.name == "high-five") { resultBranch = 15; resultStr =2; } break; case 2: // Vigiliance //////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 15; resultStr = 1; } else if (this.name == "smile") { resultBranch = 15; resultStr =2; } else if (this.name == "grin") { resultBranch = 15; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 15; resultStr =1; } else if (this.name == "laugh") { resultBranch = 15; resultStr =2; } else if (this.name == "guffaw") { resultBranch = 15; resultStr =2; } else if (this.name == "wink") { resultBranch = 1; resultStr =1; } else if (this.name == "bat eyelashes") { resultBranch = 1; resultStr =2; } else if (this.name == "flirt") { resultBranch = 1; resultStr =2; } else if (this.name == "admire") { resultBranch = 1; resultStr =1; } else if (this.name == "hug") { resultBranch = 1; resultStr =2; } else if (this.name == "dance") { resultBranch = 1; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 2; resultStr =1; } else if (this.name == "peace sign") { resultBranch = 2; resultStr =2; } else if (this.name == "shake hands") { resultBranch = 2; resultStr =2; } else if (this.name == "nod") { resultBranch = 15; resultStr =1; } else if (this.name == "bow") { resultBranch = 15; resultStr =2; } else if (this.name == "prostrate") { resultBranch = 15; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 4; resultStr =1; } else if (this.name == "bite lip") { resultBranch = 4; resultStr =2; } else if (this.name == "shiver") { resultBranch = 4; resultStr =2; } else if (this.name == "whimper") { resultBranch = 4; resultStr =1; } else if (this.name == "gasp") { resultBranch = 4; resultStr =2; } else if (this.name == "scream") { resultBranch = 4; resultStr =2; } else if (this.name == "stare") { resultBranch = 6; resultStr =1; } else if (this.name == "jaw drop") { resultBranch = 6; resultStr =2; } else if (this.name == "worship") { resultBranch = 6; resultStr =2; } else if (this.name == "gasp") { resultBranch = 14; resultStr =2; } else if (this.name == "double-take") { resultBranch = 13; resultStr =2; } else if (this.name == "eye-pop") { resultBranch = 13; resultStr =2; } else if (this.name == "frown") { resultBranch = 4; resultStr =1; } else if (this.name == "shake head") { resultBranch = 4; resultStr =2; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 3; resultStr =1; } else if (this.name == "cry") { resultBranch = 3; resultStr =2; } else if (this.name == "bawl") { resultBranch = 3; resultStr =2; } else if (this.name == "bow") { resultBranch = 13; resultStr =1; } else if (this.name == "grovel") { resultBranch = 13; resultStr =2; } else if (this.name == "beg") { resultBranch = 12; resultStr =2; } else if (this.name == "sigh") { resultBranch = 8; resultStr =1; } else if (this.name == "sneer") { resultBranch = 8; resultStr =2; } else if (this.name == "glower") { resultBranch = 8; resultStr =2; } else if (this.name == "snub") { resultBranch = 7; resultStr =1; } else if (this.name == "shove") { resultBranch = 7; resultStr =2; } else if (this.name == "spit on") { resultBranch = 7; resultStr =2; } else if (this.name == "growl") { resultBranch = 13; resultStr =1; } else if (this.name == "snarl") { resultBranch = 13; resultStr =2; } else if (this.name == "yell") { resultBranch = 13; resultStr =2; } else if (this.name == "sigh") { resultBranch = 13; resultStr =1; } else if (this.name == "roll eyes") { resultBranch = 13; resultStr =2; } else if (this.name == "cold shoulder") { resultBranch = 13; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =1; } else if (this.name == "taunt") { resultBranch = 13; resultStr =2; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 14; resultStr =2; } else if (this.name == "shiver") { resultBranch = 13; resultStr =2; } else if (this.name == "stare") { resultBranch = 12; resultStr =2; } else if (this.name == "clap") { resultBranch = 0; resultStr =1; } else if (this.name == "cheer") { resultBranch = 0; resultStr =2; } else if (this.name == "high-five") { resultBranch = 0; resultStr =2; } break; } break; case 15: // Optimism /////////////////////////////////////////////////// if (this.name == "shy smile") { resultBranch = 0; resultStr = 0; } else if (this.name == "smile") { resultBranch = 0; resultStr =1; } else if (this.name == "grin") { resultBranch = 0; resultStr = 2; } else if (this.name == "giggle") { resultBranch = 0; resultStr =0; } else if (this.name == "laugh") { resultBranch = 0; resultStr =1; } else if (this.name == "guffaw") { resultBranch = 0; resultStr =2; } else if (this.name == "wink") { resultBranch = 2; resultStr =0; } else if (this.name == "bat eyelashes") { resultBranch = 2; resultStr =0; } else if (this.name == "flirt") { resultBranch = 2; resultStr =0; } else if (this.name == "admire") { resultBranch = 2; resultStr =1; } else if (this.name == "hug") { resultBranch = 2; resultStr =1; } else if (this.name == "dance") { resultBranch = 2; resultStr =2; } else if (this.name == "kiss") { resultBranch = 1; resultStr =2; } else if (this.name == "nod") { resultBranch = 0; resultStr =0; } else if (this.name == "peace sign") { resultBranch = 0; resultStr =1; } else if (this.name == "shake hands") { resultBranch = 0; resultStr =2; } else if (this.name == "nod") { resultBranch = 5; resultStr =0; } else if (this.name == "bow") { resultBranch = 5; resultStr =1; } else if (this.name == "prostrate") { resultBranch = 5; resultStr =2; } else if (this.name == "shifty eyes") { resultBranch = 14; resultStr =0; } else if (this.name == "bite lip") { resultBranch = 14; resultStr =1; } else if (this.name == "shiver") { resultBranch = 14; resultStr =2; } else if (this.name == "whimper") { resultBranch = 14; resultStr =0; } else if (this.name == "gasp") { resultBranch = 14; resultStr =1; } else if (this.name == "scream") { resultBranch = 14; resultStr =2; } else if (this.name == "stare") { resultBranch = 14; resultStr =0; } else if (this.name == "jaw drop") { resultBranch = 14; resultStr =1; } else if (this.name == "worship") { resultBranch = 14; resultStr =2; } else if (this.name == "gasp") { resultBranch = 6; resultStr =0; } else if (this.name == "double-take") { resultBranch = 6; resultStr =1; } else if (this.name == "eye-pop") { resultBranch = 6; resultStr =2; } else if (this.name == "frown") { resultBranch = 3; resultStr =0; } else if (this.name == "shake head") { resultBranch = 3; resultStr =1; } else if (this.name == "snub") { resultBranch = 3; resultStr =2; } else if (this.name == "sniffle") { resultBranch = 4; resultStr =0; } else if (this.name == "cry") { resultBranch = 4; resultStr =1; } else if (this.name == "bawl") { resultBranch = 4; resultStr =2; } else if (this.name == "bow") { resultBranch = 13; resultStr =0; } else if (this.name == "grovel") { resultBranch = 13; resultStr =1; } else if (this.name == "beg") { resultBranch = 13; resultStr =2; } else if (this.name == "sigh") { resultBranch = 4; resultStr =0; } else if (this.name == "sneer") { resultBranch = 4; resultStr =1; } else if (this.name == "glower") { resultBranch = 4; resultStr =2; } else if (this.name == "snub") { resultBranch = 3; resultStr =0; } else if (this.name == "shove") { resultBranch = 3; resultStr =1; } else if (this.name == "spit on") { resultBranch = 3; resultStr =2; } else if (this.name == "growl") { resultBranch = 4; resultStr =0; } else if (this.name == "snarl") { resultBranch = 4; resultStr =1; } else if (this.name == "yell") { resultBranch = 4; resultStr =2; } else if (this.name == "sigh") { resultBranch = 14; resultStr =0; } else if (this.name == "roll eyes") { resultBranch = 14; resultStr =1; } else if (this.name == "cold shoulder") { resultBranch = 14; resultStr =2; } else if (this.name == "tease") { resultBranch = 13; resultStr =0; } else if (this.name == "taunt") { resultBranch = 13; resultStr =1; } else if (this.name == "shove") { resultBranch = 13; resultStr =2; } else if (this.name == "bounce") { resultBranch = 14; resultStr =0; } else if (this.name == "shiver") { resultBranch = 14; resultStr =1; } else if (this.name == "stare") { resultBranch = 14; resultStr =2; } else if (this.name == "clap") { resultBranch = 15; resultStr =1; } else if (this.name == "cheer") { resultBranch = 15; resultStr =2; } else if (this.name == "high-five") { resultBranch = 15; resultStr =2; } break; default: println("invalid emotion branch for interaction"); break; } println("new state: " +this.name + " " + resultBranch + "/" + resultStr); return(new EmoState(resultBranch, resultStr)); } /* switch(this.name) { } else if (this.name == "shy smile"){ break; } else if (this.name == "smile"){ break; } else if (this.name == "grin"){ break; } else if (this.name == "giggle"){ break; } else if (this.name == "laugh"){ break; } else if (this.name == "guffaw"){ break; } else if (this.name == "wink"){ break; } else if (this.name == "bat eyelashes"){ break; } else if (this.name == "flirt"){ break; } else if (this.name == "admire"){ break; } else if (this.name == "hug"){ break; } else if (this.name == "dance"){ break; } else if (this.name == "kiss"){ break; } else if (this.name == "nod"){ break; } else if (this.name == "peace sign"){ break; } else if (this.name == "shake hands"){ break; } else if (this.name == "nod"){ break; } else if (this.name == "bow"){ break; } else if (this.name == "prostrate"){ break; } else if (this.name == "shifty eyes"){ break; } else if (this.name == "bite lip"){ break; } else if (this.name == "shiver"){ break; } else if (this.name == "whimper"){ break; } else if (this.name == "gasp"){ break; } else if (this.name == "scream"){ break; } else if (this.name == "stare"){ break; } else if (this.name == "jaw drop"){ break; } else if (this.name == "worship"){ break; } else if (this.name == "gasp"){ break; } else if (this.name == "double-take"){ break; } else if (this.name == "eye-pop"){ break; } else if (this.name == "frown"){ break; } else if (this.name == "shake head"){ break; } else if (this.name == "snub"){ break; } else if (this.name == "sniffle"){ break; } else if (this.name == "cry"){ break; } else if (this.name == "bawl"){ break; } else if (this.name == "bow"){ break; } else if (this.name == "grovel"){ break; } else if (this.name == "beg"){ break; } else if (this.name == "sigh"){ break; } else if (this.name == "sneer"){ break; } else if (this.name == "glower"){ break; } else if (this.name == "snub"){ break; } else if (this.name == "shove"){ break; } else if (this.name == "spit on"){ break; } else if (this.name == "growl"){ break; } else if (this.name == "snarl"){ break; } else if (this.name == "yell"){ break; } else if (this.name == "sigh"){ break; } else if (this.name == "roll eyes"){ break; } else if (this.name == "cold shoulder"){ break; } else if (this.name == "tease"){ break; } else if (this.name == "taunt"){ break; } else if (this.name == "shove"){ break; } else if (this.name == "bounce"){ break; } else if (this.name == "shiver"){ break; } else if (this.name == "stare"){ break; } else if (this.name == "clap"){ break; } else if (this.name == "cheer"){ break; } else if (this.name == "high-five"){ break; default println("Unrecognized interaction string: " + this.name); break; } */ }