a
    ûi½ ã                   @   sÂ  d dl Z d dlZd dlZd dlZd dlZd dlmZ G dd„ dƒZG dd„ dƒZG dd„ dƒZG d	d
„ d
ƒZ	G dd„ dƒZ
d„dd„Zd…dd„Zd†dd„Zd‡dd„Zdˆdd„Zd‰dd„ZdŠdd„Zd‹dd„ZdŒd d!„Zdd"d#„ZdŽd$d%„Zdd&d'„Zdd(d)„Zd‘d*d+„Zd’d,d-„Zd“d.d/„Zd”d0d1„Zd•d2d3„Zd–d4d5„Zd—d6d7„Zd˜d8d9„Zd™d:d;„Z dšd<d=„Z!d›d>d?„Z"dœd@dA„Z#ddBdC„Z$dždDdE„Z%dŸdFdG„Z&d dHdI„Z'd¡dJdK„Z(d¢dLdM„Z)d£dNdO„Z*d¤dPdQ„Z+d¥dRdS„Z,d¦dTdU„Z-d§dVdW„Z.d¨dXdY„Z/d©dZd[„Z0dªd\d]„Z1d«d^d_„Z2d¬d`da„Z3d­dbdc„Z4d®ddde„Z5d¯dfdg„Z6d°dhdi„Z7d±djdk„Z8d²dldm„Z9d³dndo„Z:d´dpdq„Z;dµdrds„Z<d¶dtdu„Z=d·dvdw„Z>d¸dxdy„Z?d¹dzd{„Z@dºd|d}„ZAd»d~d„ZBd¼d€d„ZCd½d‚dƒ„ZDdS )¾é    N)Úconfigc                   @   s   e Zd Zdd„ ZdS )ÚquestionEventc                 C   s"   d| _ tdƒtdƒg| _d| _d S )NÚ ÚYesÚNor   )ÚqueryÚanswerOptionÚanswersÚtype©Úself© r   ú'/var/www/lichun.app/lichun/ws/events.pyÚ__init__   s    zquestionEvent.__init__N©Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   
   s   r   c                   @   s   e Zd Zdd„ ZdS )ÚmessageEventc                 C   sF   d| _ d| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d S )Nr   r   r   )ÚidÚdateÚhourr
   Ú
energyCostÚdiamondCostÚ	moneyCostÚaffinityChangeÚmessageÚtitleÚimager   r   r   r   r      s    zmessageEvent.__init__Nr   r   r   r   r   r      s   r   c                   @   s   e Zd Zdd„ ZdS )Ú	timeEventc                 C   s
   d| _ d S )Nr   )r
   r   r   r   r   r      s    ztimeEvent.__init__Nr   r   r   r   r   r      s   r   c                   @   s   e Zd Zdd„ ZdS )ÚdilemmaClassc                 C   s"   d| _ || _d | _|| _d| _d S )NÚdilemmaé   )r
   ÚfunctionÚanswerÚanswerOptionsÚstep)r   Úfnamer%   r   r   r   r       s
    zdilemmaClass.__init__Nr   r   r   r   r   r       s   r    c                   @   s   e Zd Zddd„ZdS )r   r   r   c                 C   s,   || _ || _|| | _|| _|| _|| _d S ©N)ÚoptionÚdatar   r   r   r   )r   r)   r*   r   r   r   r   r   r   r   '   s    
zanswerOption.__init__N)r   r   r   r   r   r   r   r   r   r   &   s   r   Fr   c
                 C   sR   |rNt ƒ }
| |
_||
_|j|
_|j|
_||
_||
_||
_||
_	||
_
|	|
_|
S d S r(   )r   r   r   r   Ú	hourOfDayr   r   r   r   r   r   r   )r'   r   ÚplayerÚcheckr   r   r   r   r   r   Úmr   r   r   ÚmessageFunction/   s    r/   c                 C   s‚   |r~|j |_tj|_ td|  ƒ tƒ }| |_t|dƒrH|j|_|j|_	n||_|rzt
|d ƒtkrtdd„ t|ƒD ƒ}||_|S d S )Nz	question!r   r   c                 S   s   g | ]\}}t |t|ƒƒ‘qS r   )r   Ústr)Ú.0Úir)   r   r   r   Ú
<listcomp>N   ó    z$questionFunction.<locals>.<listcomp>)Ú	gameSpeedÚpreviousGameSpeedr   ÚSPEED_QUESTION_PAUSEÚprintr   r   Úhasattrr   ZobjectIdr
   r0   Ú	enumerater	   )r'   r   r,   r-   r%   r.   r   r   r   ÚquestionFunction?   s    

r;   r   c                 C   st   | j D ]h}d}d}||j |j }|jdk r|| jvrd}d|j d |j d |j d }t||| |ƒ  S qd S )NFÚlowAffinityiÎÿÿÿTúYour ú z, deeply dislikes you after years of neglect.)ÚrÚ	firstnameÚlastnameÚaffinityÚeventsr   r/   )r,   r
   Úpersonr-   r'   r   r   r   r   r<   X   s    
"r<   c                 C   sZ   d}|| j vo| jjdk}|dkrV|rVddlm} | j  |¡ | jj |dddd¡ d S )	NÚoneTimeEventTestr   r$   ©ÚoneTimeEventzOct 10thz,Are you today's date? Because you're 10/10!!z10-10)r   r   r   )rC   ÚcÚageDaysÚ	functionsrG   ÚappendÚoneTimeEvents)r,   r
   r   Úresponser'   r-   rG   r   r   r   rE   s   s    rE   c                 C   sœ  d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkr,|r,dd	lm}m} g }|| ƒ}	|	r¨| td
|	j	d  d |	j
 d t|	jƒ d |	j |	jƒ¡ tƒ }
tdƒD ]d}|| ƒ}	|	j|
vrºqÐqº|
 |	j¡ | td
|	j	d  d |	j
 d t|	jƒ d |	j |	jƒ¡ q¶t||| ||ƒS |dkr˜|d | j_ddlm} || |d ƒ}|j| jjkrvd| j_nd| j_ddlm} || dddƒ d S )NÚ
firstCrushé
   é   é   éd   z1You have a crush on someone at school, who is it?r$   r   )Úget_random_classmateÚget_random_friendr=   ú, z, a z
 year old é   r*   ©Ú
get_personZ
homosexualZheterosexual©Úupdate_relationshipZCrush)ÚaskedQuestionsrH   ÚageYearsÚrandomrJ   rS   rT   rK   r   Úrelationshipsr@   r0   Úsexr   ÚsetÚrangeÚaddr;   rN   rX   ZsexualOrientationÚapprZ   )r,   r
   r   rM   r'   r-   rS   rT   r%   r)   Z	added_idsr2   rX   ZcrushrZ   r   r   r   rN      s4    2>
@

rN   c                 C   s¸  d}ddl m} || jvoZ| jj oZtt|| jddiƒƒƒdkoZ| jjdkoZdt	 	¡ d k}d	}|d
kr2|r2t|| jddiƒƒ}g }|D ]l}	t
| jj|	j ƒdkrŒ|	jd rŒ|	jdkrŒ|	j| jjkrŒ| td|	jd  d |	j d |	j |	jƒ¡ qŒt|ƒdkrt||| ||ƒS | j |¡ | j d¡ n‚|d
kr´ddl m}
 |
| |d ƒ}|jd }t	 	¡ |k r¨|d | j_ddlm} || dddƒ | j |jd ¡ n| j d¡ d S )NÚdating_choicer   )Úfind_where_testZaffinity__gté2   rP   rQ   rR   zWho would you like to ask out?r$   é   r=   rU   r>   z$No one likes you enough to date you!rW   r*   rY   ÚPartnerz
 said yes!zThey said no!)rJ   re   r[   rH   ÚrelationshipÚlenÚlistr?   r\   r]   Úabsr^   ZfamilyLevelr_   rK   r   r@   rA   r   r;   ÚmessageQueuerX   rB   Úpartnerrc   rZ   )r,   r
   r   rM   r'   re   r-   Úoptionsr%   r)   rX   ÚpZaffinityRatiorZ   r   r   r   rd   ¯   s0    L82

rd   c                 C   s¶   d}|| j vo(| jjdko(dt ¡ d k}|dkrŠ|rŠ| jjr²ddlm} || | jjƒ}|jdkr²d	|j d
 |j	 d }t
||| |ƒS n(|dkr²|d dkr²d| j_| j d¡ d S )NÚmarriageé   rQ   éè  r$   r   rW   éP   zWould you like to marry r>   ú?r)   r   Tz"You are now engaged to be married!)r[   rH   r\   r]   rn   rJ   rX   rB   r@   rA   r;   Úengagedrm   rK   ©r,   r
   r   rM   r'   r-   rX   rn   r   r   r   rq   Í   s    &
rq   c           	      C   s    d}|| j vo6t| jddƒo6| jjdko6dt ¡ d k}|dkrœ|rœ| jjrœdd	lm} || | jjƒ}|jd
krœd}ddlm	} || dddƒ t
||| |ƒS d S )NÚweddingrv   Frr   rQ   rs   r$   r   rW   rt   z;You have a beautiful wedding! Everyone is so happy for you!rY   rh   ZSpouse)r[   ÚgetattrrH   r\   r]   rn   rJ   rX   rB   rZ   r/   )	r,   r
   r   rM   r'   r-   rX   rn   rZ   r   r   r   rx   Ü   s    4
rx   c                 C   sØ   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}|dkr–|r–| jjrÔddlm} || | jjƒ}|jd	krÔd
|j d |j	 d }t
||| |ƒS n>|dkrÔ|d dkrÀd| j_| j d¡ nd| j_| j d¡ d S )NÚ	haveChildrr   rf   rQ   rs   r$   r   rW   rt   z$Would you like to have a child with r>   ru   r)   r   Tz#You are now trying to have a child!Fz)You decide not to have a child right now.)r[   rH   r\   r]   rn   rJ   rX   rB   r@   rA   r;   ÚtryingForChildrm   rK   rw   r   r   r   rz   é   s    2
rz   c           	   	   C   sö   d}|| j vo@| jjdko@| jjdko@| jjdk o@dt ¡ d k}|dkrŽ|rŽ| jjròdd	lm} || | jjƒ}|jd
kròd}t	||| |ƒS nd|dkrò|d dkròd| j_
d| j_ddlm} | jj || jddgd| jj dd¡ | j d¡ d S )NÚpregnantTrr   rf   rQ   rs   r$   r   rW   rt   zYou are pregnant!r)   r   F©Ú	schedulerÚ	PregnancyÚdailyÚhomei  ©ÚlocationZdurationzYou are now pregnant!)r[   rH   r{   r\   r]   rn   rJ   rX   rB   r/   r|   r~   Ú	schedulesrK   r   rm   )	r,   r
   r   rM   r'   r-   rX   rn   r~   r   r   r   r|   ú   s     >
(r|   c           	      C   s   d}ddl m} t| jddƒo(|| jdƒ}|dkrŒ|rŒddl m} || ƒ}d| j_d| j_d	| j_| j 	d
|j
 d |j ¡ t||| |ƒS d S )NÚ	childBornr   ©ÚscheduleCompleter|   Fr   r$   )Ú	add_childTz You have a child! Their name is r>   )rJ   r‡   ry   rH   rˆ   r|   r{   Úchildrenrm   rK   r@   rA   r/   )	r,   r
   r   rM   r'   r‡   r-   rˆ   Úchildr   r   r   r…     s    r…   c                 C   s  d}d}dt ddddg}|| jvoJ| jjdkoJ| jjd	k oJd
t ¡ d k}|dkrdt||| ||ƒS |dkr|d |d kr¦ddlm} || | jjdƒ} | j	 
d¡ |d |d
 krîddlm} || | jjdƒ} |  jd7  _| j	 
d¡ n|  jd8  _| j	 
d¡ d S )NÚplayDatezPYour parents have arranged a play date for you with another kid, how does it go?zIt goes wellz!You can't wait to hang out again!é   ©r   zYou and them do not get along.rV   é   rQ   rR   r$   r)   r   ©Ú
add_friendÚsimilarúYou have made a new friend!rO   zYou love making friends!zYour playdate did not go well)r   r[   rH   r\   r]   r;   rc   r   r_   rm   rK   Úsocial)r,   r
   r   rM   r'   r%   r-   r   r   r   r   r‹   Q  s$    2
r‹   c           
      C   sð   d}| j jdkoB| j jdkoB| j jdkoB| j jdk oBdt ¡ d k}dd	lm} || ƒ}d
|j d |j d }ddg}|dkrt	||| ||ƒS |dkrì|d |d krÒddl
m}	 |	| | j jdƒ} | j d¡ n|  jd8  _| j d¡ d S )NÚ	newFriendÚschoolÚstudentrV   é   rQ   rs   r   ©rS   zYou have met r>   z) at school, would you like to be friends?r   r   r$   r)   r   r‘   r’   rO   zYou have not made a new friend.)rH   rƒ   Ú
occupationr\   r]   rJ   rS   r@   rA   r;   rc   r   r_   rm   rK   r“   )
r,   r
   r   rM   r'   r-   rS   Ú	classmater%   r   r   r   r   r”   f  s    @r”   c                 C   s    d}|| j vo@| jjdko@| jjdko@| jjdk o@dt ¡ d k}d}dd	g}|d
krft||| ||ƒS |d
krœ|d dkrŒ| j jd7  _n| j jd8  _d S )NÚ
likeSchoolr–   rV   rŽ   rQ   rs   z.You have started Kindergarten, do you like it?r   r   r$   r)   rO   )r[   rH   r™   r\   r]   r;   Ú	happiness©r,   r
   r   rM   r'   r-   r%   r   r   r   r›   y  s    >r›   c                 C   s’   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkrPt||| |ƒS |dkrŽ|d d	kr‚| j d
¡ | j jd7  _n| j d¡ d S )NÚfreeConcerté   rR   rQ   rs   zŒYour favorite Band is coming to town and tickets are pricey. You see that there is an enter-to-win competition online. Do you want to enter?r$   r)   r   zŽA day after entering the competition you receive a phone call from the concert venue confirming that you just won two tickets to see the band!rO   zPA week passes and you never hear if you won tickets. Oh well, perhaps next time!)r[   rH   r\   r]   r;   rm   rK   rœ   ©r,   r
   r   rM   r'   r-   r   r   r   rž   †  s    2rž   c                 C   sÄ   d}|| j vo(| jjdko(dt ¡ d k}d}tdƒtdƒtdd	d
g}|dkr`t||| ||ƒS |dkrÀ|d |d kr†| j d¡ n:|d |d kr¤| j d¡ n|d |d krÀ| j d¡ d S )NÚ	firstKissrP   rQ   rs   z8Someone leans in for a kiss, how do you want to respond?zLean inz,Slowly back away while their eyes are closedzLet them down easyrg   r   r$   r)   r   zˆYour heart starts to beat fast and you can feel them inching closer. You squeeze your eyes shut and your lips touch. That wasn't so bad!zÃTheir eyes flutter open and you quickly lean to the left and dodge their puckering lips coming closer to you. Phew! Seems like you dodged a bullet. You leave them standing there feeling dejected.r"   zÆYou tell them you appreciate their gesture but you do not feel the same way and wish them best of luck in their endeavors. They respond positively and the two of you carry on as if nothing happened.©r[   rH   r\   r]   r   r;   rm   rK   r   r   r   r   r¡   “  s    &r¡   c                 C   sz   d}|| j vo(| jjdko(dt ¡ d k}d}|dkrNddg}t||| ||ƒS |dkrv|d	 dkrv| j d
¡ d| j_d S )NÚfoundAPennyrg   rQ   é@B z9You see something shiny on the ground. Do you pick it up?r$   z
Pick it upzLeave it on the groundr)   aŽ  You pick up the object and see that it is a shiny penny. You raise it to eye level to observe the markings. How lovely you think, a penny from the year you were born. As you reflect on memories that pop up in your mind, you collapse to the ground while your body gives a lifeless shudder and the penny rolls out of the palm of your hand onto the ground. Waiting for someone else to come pick it up.Údead)r[   rH   r\   r]   r;   rm   rK   Ústatusr   r   r   r   r£   ¢  s    &r£   c                 C   sœ   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkrZdd	g}t||| ||ƒS |dkr˜|d
 dkr|| j d¡ n| j d¡ | j jd7  _d S )NÚminorInjuryrg   é   rQ   r¤   zuYou are playing outside with your friends and you fall down. You scrape your knee and it is bleeding. What do you do?r$   zGo home and tell your parentszIgnore it and keep playingr)   zlYou walk home and show your parents your knee. They clean it up and put a bandaid on it. You are good to go!z$You ignore the pain and keep playing)r[   rH   r\   r]   r;   rm   rK   r“   r   r   r   r   r§   ®  s    2r§   c                 C   sÐ   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkrv|rvdd	g}| j jt dd
¡8  _t||| ||ƒS |dkrÌ|d dkr°| j d¡ | j jt dd¡7  _n| j d¡ | j j	d8  _	d S )NZsicnkessrg   r¨   rQ   r¤   zKYou have caught a pretty bad cold, you feel weak are coughing and sneezing.r$   zStay home and restzGo to school anywaysrO   r)   z;You stay home and rest. You feel a bit better the next day.rŒ   z:You go to school anyways and spread your germs to everyone)
r[   rH   r\   r]   ÚenergyÚrandintr;   rm   rK   r“   r   r   r   r   ÚminorSickness¼  s    2r«   c                 C   sè   d}|| j vo$| jjo$dt ¡ d k}d}tdddtdd	d
tdddg}|dkrdt||| ||ƒS |dkrä|d |d krŠ| j d¡ nZ|d |d kr¸| j jd8  _| j d¡ n,|d |d krä| j jd8  _| j d¡ d S )NÚcarCrashrQ   é † z>You're driving at night and a deer jumps in front of your car.zSwerve leftrg   r   zHit the brakesrf   ©r   zSpeed up©r   r$   r)   r   zbIts a quiet night and no other cars are on the road. You swerve around the deer without a scratch!zzYou slam the breaks but still hit the deer. You (and the deer) are safe, but the windshield will need some costly repairs!r"   rO   z^...Why would you speed up? You hit the deer at full speed and spent the night in the hospital.)	r[   rH   ZcanDriver]   r   r;   rm   rK   rœ   r   r   r   r   r¬   Î  s    ""r¬   c                 C   s°   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}tddd	td
ddg}|dkrjt||| ||ƒS |dkr¬|d |d kr| j d¡ n|d |d kr¬| j d¡ d S )NÚopenbankAccountr¨   é   rQ   rs   zUYou're making real money now and the piggy bank isn't big enough anymore! Whats next?z$Open a new account at the local bankrO   r®   z+Open a new account with a promotional bonusr   r$   r)   r   z_You have a new bank account! Wait... since when did checks cost so much money? Whats the point?zMYou have enough money to qualify for the new account promotional bonus, nice!r¢   r   r   r   r   r°   ß  s    2r°   c                 C   s<  d}|| j vo(d| jjv o(dt ¡ d k}d}tdddtd	ƒtd
ƒtdddg}|dkrjt||| ||ƒS |dkr8|d |d kr¢| j d¡ | j jd7  _n–|d |d krÀ| j d¡ nx|d |d krü| j d¡ |  j	d8  _	| j jd7  _n<|d |d kr8| j d¡ |  j	d7  _	| j jd7  _d S )NÚ	dropBooksr•   rQ   rs   zKYou're walking down a busy hall at school and see someone drop their books.z&Stop and help them pick up their booksrg   r¯   zKeep walkingzStop and laugh - what a loser!z0Grab a few books and offer to walk them to classr   r$   r)   r   z‹They give you a quick nod of appreciation, say thanks, and hurry off to class. You stop for a second and smile - it feels good to help out!rO   zwYou made it to class on time and spend the first few minutes of class wondering if that student made it on time as wellr"   z‰Tears form in the student's eyes and they scramble to pick up their books. You smile to yourself, happy you're not a loser like they are.r±   rŒ   zîThe student looks visibly surprised and happy to receive your help. They say a quiet 'thank you' once you get to their classroom and you both go on your way. You think you hear the student whispering to their friends about your good deed.)
r[   rH   rƒ   r]   r   r;   rm   rK   rœ   r“   r   r   r   r   r²   ì  s(    &$
r²   c                 C   s  d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}tddd	td
dd	tddd	g}|dkrtt||| ||ƒS |dkr|d |d kr¬| j d¡ | j jd7  _nh|d |d krè| j d¡ |  j	d7  _	| j jd7  _n,|d |d kr| j d¡ |  j	d7  _	d S )NÚ	fieldTriprŽ   é   rQ   rR   zYour school has handed you a form for the next field trip - it looks like you're able to vote for where to go! What looks best?zVisit the local zoor±   r®   zExplore the science museumr¨   z$Take a trip to a historical landmarkrO   r$   r)   r   zJYou had a great time at the zoo and learned a lot about different animals!zdThe science museum was fascinating! You got to perform fun experiments and see interactive exhibits.rg   r"   zˆYou spent some time at an old war memorial. It was a little sad, but you found it interesting to see the rich history of where you live.)
r[   rH   r\   r]   r   r;   rm   rK   rœ   r“   r   r   r   r   r³     s"    2"
r³   c                 C   s,  d}|| j vo(d| jjv o(dt ¡ d k}d}tdƒtdddtd	d
dtdddg}|dkrnt||| ||ƒS |dkr(|d |d kr¤| j d¡ |  jd
8  _n„|d |d krÐ| j d¡ |  jd
7  _nX|d |d krü| j d¡ |  jd7  _n,|d |d kr(| j d¡ |  jd
7  _d S )NÚvendingMachiner•   rQ   rs   zœYou walk past someone standing next to a vending machine at school. As you pass, they yell 'Hey - this machine isn't accepting my dollar, can you help out?'z,Point to your headphones and shake your headz)Give them one of your dollar bills to tryr®   z7You only have a 5 dollar bill, but hand it over anywaysrg   z%Walk over and hit the vending machinerO   r   r$   r)   r   z?You weren't listening to anything, but you got the point acrosszƒThe dollar bill works perfectly.The appreciative student gives you their dollar with a smile, grabs their snack, and heads to classr"   z`To both of your surprise, the machine takes the 5 dollar bill... but it doesn't give any change.z‘You've seen this machine act up before - nothing a quick kick can't fix! Your foot connects with the glass and two bags of chips fall down. Nice.©	r[   rH   rƒ   r]   r   r;   rm   rK   r“   r   r   r   r   rµ     s&    &(
rµ   c                 C   s¶   d}|| j vo(d| jjv o(dt ¡ d k}d}tdƒtdƒg}|dkrVt||| ||ƒS |dkr²|d	 |d
 krˆ| j d¡ |  jd7  _|d	 |d
 kr²| j d¡ |  jd8  _d S )NÚschoolAssemblyr•   rQ   rs   zmAll students are called for an impromptu assembly. Once you take your seat, the speaker asks for a volunteer.zRaise your handz8Shrink smaller into your seat, hoping he doesn't see your$   r)   r   zvYou smile as the speaker points directly at you. As you stand up, you feel all eyes on you... and its a great feeling.rO   z_You let out a giant sigh of relief as the speaker picks an enthusiasic student across the room.r¶   r   r   r   r   r·   +  s    &r·   c                 C   sÚ   d}|| j vo4| jjdko4| jjdko4dt ¡ d k}d}tddd	td
ddtddddg}|dkrvt||| ||ƒS |dkrÖ|d |d krœ| j d¡ n:|d |d krº| j d¡ n|d |d krÖ| j d¡ d S )NÚromanticDateé   rr   rQ   rR   zPLove is in the air! Its your turn to pick date night. What would you like to do?z-Have a candlelit dinner at a fancy restaurantrf   r®   z Go for a scenic walk in the parkrO   r¯   z3Watch a movie under the stars at a drive-in theateré   rg   )r   r   r$   r)   r   zUYou had a magical candlelit dinner at a fancy restaurant. It was a night to remember!zuYou enjoyed a long walk in the park, hand in hand, as the sun set. It was beautiful (but you're both a little tired!)r"   zvYou cuddled up in the car, watching a movie under the starry sky at the drive-in theater. It was a perfect date night!r¢   r   r   r   r   r¸   :  s     2

ýr¸   c                 C   s  d}|| j vo@d| jjv o@| jjdko@| jjdko@dt ¡ d k}d}tdd	d
tddd
tdddg}|dkr€t||| ||ƒS |dkr|d |d kr¸| j d¡ | j j	d8  _	nJ|d |d krÖ| j d¡ n,|d |d kr| j d¡ |  j
d7  _
d S )NÚschoolFightr•   rŸ   rr   rQ   rR   zQTensions are high, and a fight is about to break out at school. What will you do?z'Intervene and try to break up the fightr¨   r¯   z9Stay out of it and find a teacher to handle the situationrg   z(Join in and fight alongside your friendsrO   r   r$   r)   r   zVYou courageously step in to break up the fight and promptly get punched in the face...zTYou run the other way in search of a teacher. Some things just aren't worth the riskr"   z¨Fists are flying, but you've got your friends' back. Once the dust settles you see a crowd of teachers around - you know you're in trouble, but it was totally worth it.)r[   rH   rƒ   r\   r]   r   r;   rm   rK   rœ   r“   r   r   r   r   r»   N  s$    >


ý
r»   c                 C   sú   d}|| j vo2| jdko2d| jjv o2dt ¡ d k}d}tddd	td
ddtdddtdƒg}|dkrxt||| ||ƒS |dkrö|d |d krž| j d¡ nX|d |d kr¼| j d¡ n:|d |d krÚ| j d¡ n|d |d krö| j d¡ d S )NÚschoolLunchr´   r•   rQ   rR   zYour stomach growls - when's lunch? Thankfully, the bell rings and you make your way to the cafeteria. What are you eating today?z Grab a slice of pizza and a sodarO   r®   z,Choose a healthy salad and a bottle of waterr   z6Go to your locker and grab your packed lunch from homerg   r¯   zGrab someone else's lunchr$   r)   r   zgThe pizza was amazing, but you spend the next few hours regretting leaving all the grease on the slice.z3It might be more expensive, but its worth the cost!r"   zNAs you finish your sandwich, you reach into the bag and find a cookie - score!z®You eye the cafeteria looking for a student sitting alone. You spot a lanky kid at the end of a long table, walk over, and grab the lunch. Everything is better when its free!)	r[   r+   rH   rƒ   r]   r   r;   rm   rK   r   r   r   r   r¼   c  s&    0


ür¼   c                 C   s  d}|| j vo@d| jjv o@| jjdko@| jjdko@dt ¡ d k}d}tdd	d
tddd
tdddtdd	d
g}|dkrŠt||| ||ƒS |dkr|d |d kr²| j d¡ nZ|d |d krÐ| j d¡ n<|d |d krî| j d¡ n|d |d kr| j d¡ d S )NÚforgotCombor•   é   r¨   rQ   rR   z‹You walk over to your locker and enter your combo. 25-44-... what was the last number? You start to panic, did you forget your combination?z.Ask a friend if they remember your combinationrg   r¯   z*Head to the school office to get some helprO   zBrute force your combinationr   zStart kicking your lockerr$   r)   r   zXLuckily, your friend remembers your locker combination. ...wait, how did they know that?znIt took a while, but the school office was able to track down a maintenance person to get you into your lockerr"   zcAfter about 30 tries you made it into your locker. Good thing you remembered the first two numbers!rŒ   z°You loudly kick the locker for a few minutes, doing nothing more than adding a few dents. Eventually a teacher angrily storms into the hall and brings you to the school office.)	r[   rH   rƒ   r\   r]   r   r;   rm   rK   r   r   r   r   r½   y  s&    >



ü
r½   c                 C   sª   d}|| j vo(d| jjv o(dt ¡ d k}d}tdƒtddd	td
ddg}|dkrdt||| ||ƒS |dkr¦|d |d krŠ| j d¡ n|d |d kr¦| j d¡ d S )NÚlatetoSchoolr   rQ   rs   zLYou woke up late and now you're running behind for school. What will you do?zArrive late and get a tardyz"Hurry to school as fast as you canr±   r¯   zSkip school for the dayrO   r   r$   r)   r   zmYou hop out of bed and rush to get to school - you were a little late and forgot your lunch, but you made it!z“You hop out of bed and rush to get to school... but stop halfway and realize that you're probably this tired for a reason. Some rest would be good!©r[   rH   rƒ   r]   r   r;   rm   rK   r   r   r   r   r¿     s    &

ýr¿   c                 C   sÌ   d}|| j vo(d| jjv o(dt ¡ d k}d}tdddtd	d
dtdd
dg}|dkrht||| ||ƒS |dkrÈ|d |d krŽ| j d¡ n:|d |d kr¬| j d¡ n|d |d krÈ| j d¡ d S )NÚtiredinClassr•   rQ   rs   zcYou had a late night last night and now you're struggling to stay awake in class. What will you do?z6Try as hard as you can to stay awake and pay attentionrO   r¯   z/Ask the teacher if you can head to the bathroomrg   r   z4Take a quick nap and hope the teacher doesn't noticer$   r)   r   zŠThrough the power of sheer determination you manage to stay awake for the rest of class. Honestly, you're pretty impresssed with yourself!zªYou asked the teacher if you can head to the bathroom. After getting permission, you head out into the hallway and grab a soda from the vending machine. This should work!r"   zbThe teacher immediately notices you sleeping. At least now you'll be able to sleep in detention...rÀ   r   r   r   r   rÁ      s     &


ýrÁ   c                 C   sT   d}|| j vo@| jjdko@| jjdko@| jjdk o@dt ¡ d k}d}t||| |ƒS )NÚstartedPeriodÚFemalerO   rŸ   rQ   rs   z"You have started your first period)rC   rH   r_   r\   r]   r/   ©r,   r
   r'   r-   r   r   r   r   rÂ   µ  s    >rÂ   c                 C   sf   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}dtt | jjd d ¡ƒ d	 }t||| |ƒS )
NÚlearnedWalké  éÐ  rQ   rs   zYou have learned to walk at é   çffffff@ú months)rC   rH   rI   r]   r0   ÚmathÚfloorr/   rÄ   r   r   r   rÅ   »  s    2"rÅ   c                 C   sl   d}|| j vot| jddƒ}|rh| jjD ]>}|j| jjjkr(|jdkoN|jdk}d}t||| |ƒ  S q(d S )NÚemployeeOfTheMonthÚjobFrf   z	Word Hardz$You were named employee of the month)	rC   ry   rH   ÚactivityRecordsr   rÎ   ZperformanceZfocusr/   )r,   r
   r'   r-   Úrecordr   r   r   r   rÍ   Á  s    rÍ   c                 C   s<   d}|| j vo(| jjdko(dt ¡ d k}d}t||| |ƒS )NÚbreakArmé   rQ   é'  zYou fell and broke your arm)rC   rH   r\   r]   r/   rÄ   r   r   r   rÑ   Ê  s    &rÑ   c                 C   s–   d}t | jddƒ}|r’ddlm} || ƒ}|| jvoV|jdkoV|jdk oVdt ¡ d	 k}d
|j d tt	 
| jjd d ¡ƒ d }t||| |ƒS d S )NÚchildLearnedWalkr‰   Fr   )Úget_youngestChildrÆ   rÇ   rQ   rs   zYour child z learned to walk at rÈ   rÉ   rÊ   )ry   rH   rJ   rÕ   rC   rI   r]   r@   r0   rË   rÌ   r/   )r,   r
   r'   r-   rÕ   rŠ   r   r   r   r   rÔ   Ð  s    .,rÔ   c                 C   s–   ddl m} d}| jjdkoL| jjdk oL|| jvoLd| jjv oLdt ¡ d k}d	}|rˆ| jj || jd
ddgd| jj	 t 
dd¡d¡ t||| |ƒS )Nr   r}   ÚlearnedBikerÇ   é´  r   rQ   rs   z?Your parents have decided to start teaching you to ride a bike.zLearning to ride biker€   Úeveningrg   rO   r‚   ©rJ   r~   rH   rI   rC   rƒ   r]   r„   rK   r   rª   r/   ©r,   r
   r~   r'   r-   r   r   r   r   rÖ   Û  s    >2rÖ   c                 C   s–   ddl m} d}| jjdkoL| jjdk oL|| jvoLd| jjv oLdt ¡ d k}d	}|rˆ| jj || jd
ddgd| jj	 t 
dd¡d¡ t||| |ƒS )Nr   r}   ÚlearnedSwimr×   iŽ  r   rQ   rs   z5Your parents have signed you up for swimming lessons!zLearning to swimr€   rØ   rg   rO   r‚   rÙ   rÚ   r   r   r   rÛ   ä  s    >2rÛ   c                 C   sœ   ddl m} d}| jjdkoR| jdkoR| jjdkoR| jjdk oR|| jvoRd| jjv }d	}|rŽ| jj 	|| jd
ddgd| jj
 t dd¡d¡ t||| |ƒS )Nr   r}   ÚactTestÚ12thé	   r¹   é   r•   zXYour guidance counselor reminds you of the upcoming ACT test. It's time to get studying!úStudying for ACTú
twice-weekrØ   r   r±   rf   r‚   )rJ   r~   rH   Ú	educationÚmonthOfYearr\   rC   rƒ   r„   rK   r   r]   rª   r/   rÚ   r   r   r   rÜ   í  s    D2rÜ   c           	      C   sž   d}ddl m} | jj o$|| jdƒ}dg}|dkrL|rLd}t||| ||ƒS |dkršd}t ¡ d	krzd
}t dd¡| j_nd}t dd¡| j_| j |¡ d S )NÚactTestTaker   r†   rà   z!I've done all the studying I can.r$   zToday is your ACT test!r   ç      à?zYou did well!r±   é$   zYou did not do well.rO   rß   )	rJ   r‡   rH   ÚactScorer;   r]   rª   rm   rK   )	r,   r
   r   rM   r!   r'   r‡   r-   r%   r   r   r   rä   ö  s    rä   c                 C   sœ   ddl m} d}| jjdkoR| jdkoR| jjdkoR| jjdk oR|| jvoRd| jjv }d	}|rŽ| jj 	|| jd
ddgd| jj
 t dd¡d¡ t||| |ƒS )Nr   r}   ÚsatTestrÝ   rQ   é   rß   r•   zXYour guidance counselor reminds you of the upcoming SAT test. It's time to get studying!zStudying for SATrá   rØ   r   r±   rf   r‚   )rJ   r~   rH   râ   Ú	dayOfYearr\   rC   rƒ   r„   rK   r   r]   rª   r/   rÚ   r   r   r   rè   	  s    D2rè   c                 C   sÜ   d}| j jo4|| jvo4t| j ddƒ o4dt ¡ d k}d}|dkrŒ|rŒg }| jD ]}| t|jt	|j
ƒƒ¡ qP| tdƒ¡ t||| ||ƒS |dkrØ|d	 dkrØ| jD ]0}|j
|d	 kr¦|| j _| j d
|j ¡  qØq¦d S )NÚchooseMajorÚmajorFrQ   rR   z\Your guidance counselor reminds you that college is coming! What would you like to major in?r$   ÚNoner*   zYou have chosen to major in )rH   rç   r[   ry   r]   ÚmajorsrK   r   r   r0   r   r;   rì   rm   )r,   r
   r   rM   r'   r-   r%   rì   r   r   r   rë     s     2

rë   c           
      C   sD  d}| j jo4|| jvo4t| j ddƒ o4dt ¡ d k}d}|dkr°|r°g }| jD ]@}| t|jd t	|j
ƒ d	 t	|jƒ d
 |j |jd¡ qP| tdƒ¡ t||| ||ƒS |dkr
|d dkr@ddlm} | j j |dd|d  | jddtdd|d id¡ n6|dkr@ddlm}	 |	| jd|iƒ| j _| j d¡ d S )NÚchooseCollegeÚcollegeFrQ   rR   zpYour guidance counselor reminds you that it's time to start applying to colleges. Where would you like to apply?r$   z GPA: z ACT: z<br> )r*   rí   r)   r   rF   zCollege AcceptancezYou have been accepted to r*   ZdaysFromNowrŸ   )ÚcompleteFrM   )r   r   r   ZdateTypeZdateModifierZcompletionFuncZcompletionArgsZcompletionKwargsrñ   )Ú
find_wherer   zYou were accepted!)rH   rç   r[   ry   r]   ZcollegesrK   r   r   r0   ZGPA_reqZACT_reqÚdescriptionr;   rJ   rG   rL   r   rï   rò   rð   rm   )
r,   r
   r   rM   r'   r-   r%   rð   rG   rò   r   r   r   rï   %  s8    2
>


øÿ
rï   c                 C   sH   d}| j jdko4| j jdko4|| jvo4dt ¡ d k}d}t||| |ƒS )NÚlostFirstToothrÒ   rŽ   rQ   rs   z$You have lost your first baby tooth!©rH   r\   rC   r]   r/   rÄ   r   r   r   rô   F  s    2rô   c                 C   sH   d}| j jdko4| j jdko4|| jvo4dt ¡ d k}d}t||| |ƒS )NÚlostLastToothrO   r´   rQ   rs   z#You have lost your last baby tooth!rõ   rÄ   r   r   r   rö   L  s    2rö   c           	      C   s¢   d}do8|| j vo8| jjdko8| jjdk o8dt ¡ d k}d}|dkr^g d	¢}t||| ||ƒS |dkrž|d
 dkržG dd„ dƒ}||ƒ}d
g|_| jj |¡ d S )NÚchildhoodActivityFrŽ   rP   rQ   rs   zNYour parents want you to take on a new activity, what would you like to learn?r$   )zLearn InstrumentzDance ClasszSports Teamrí   r)   rí   c                   @   s   e Zd Zdd„ ZdS )z*childhoodActivity.<locals>.extracurricularc                 S   s   d| _ || _d| _d S ©NÚextracurricularrO   ©r
   r   ZenergyModifier©r   r   r   r   r   r   ^  s    z3childhoodActivity.<locals>.extracurricular.__init__Nr   r   r   r   r   rù   ]  s   rù   )r[   rH   r\   r]   r;   r   Ú
activitiesrK   ©	r,   r
   r   rM   r'   r-   r%   rù   Úchoicer   r   r   r÷   S  s    6r÷   c           	      C   s´   d}doRd| j voRd| j v oRt| jjƒdkoR| jjdkoR| jjdk oRdt ¡ d k}d	}|d
krxg d¢}t||| ||ƒS |d
kr°|d dkr°G dd„ dƒ}||ƒ}| jj |¡ d S )NÚlearnInstrumentFr÷   r   rO   rr   rQ   rs   z(What instrument would you like to learn?r$   )ZPianoZGuitarZViolinZDrumsrí   r)   rí   c                   @   s   e Zd Zdd„ ZdS )z(learnInstrument.<locals>.extracurricularc                 S   s   d| _ || _d| _d S rø   rú   rû   r   r   r   r   r  s    z1learnInstrument.<locals>.extracurricular.__init__Nr   r   r   r   r   rù   q  s   rù   )r[   rj   rH   rü   r\   r]   r;   rK   rý   r   r   r   rÿ   g  s    Prÿ   c                 C   st   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|rp| j  |¡ t ¡ dkrZdS d	| j_t||| |ƒS d S )
NÚbracesrÈ   r±   rQ   rÓ   zAAt a recent trip to the dentist they said you need to get braces!rå   FT)r[   rH   r\   r]   rK   r   r/   r    r   r   r   r   y  s    2r   c                 C   st   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|rp| j  |¡ t ¡ dkrZdS d	| j_t||| |ƒS d S )
NÚglassesrÈ   r±   rQ   rÓ   zEAt a recent trip to the eye doctor they said you need to get glasses!g333333ã?FT)r[   rH   r\   r]   rK   r  r/   r    r   r   r   r  …  s    2r  c           
      C   sò   d}|| j vo>| jj o>| jjdko>| jjdk o>dt ¡ d k}d}|dkrˆ|rîg }| jD ]}|jdkrZ| |j¡ qZt	||| ||ƒS nf|dkrî|d	 d
krî| jD ]J}|j|d	 kr¢ddl
m} d|_|| j|| jƒ ddl
m}	 |	| |ƒ} q¢d S )NÚfirstJobr¨   rr   rQ   r­   zOYou are now old enough for your first part-time job, what would you like to do?r$   Únoner)   rí   r   ©ÚsetJobZpartTime©Úcreate_coworkers)r[   rH   rÎ   r\   r]   ÚoccupationsZrequirementsrK   r   r;   rJ   r  ZhourTyper   r  )
r,   r
   r   rM   r'   r-   r%   r™   r  r  r   r   r   r  ’  s&    <


r  c                 C   sÜ   d}|| j vo4| jjdko4| jjdk o4dt ¡ d k}d}|dkrr| j}g }|D ]}| |j¡ qPt||| ||ƒS |dkrØ|d d	krØd
dlm	}	m
}
 | j}|	|d|d iƒ}| jj |¡ | jj |
|j|j| jƒ¡ d S )Nrù   rP   rr   rQ   r¤   z6What extra curricular activity would you like to join?r$   r)   rí   r   )rò   ÚActivityRecordr   )r[   rH   r\   r]   ÚextraCurricularsrK   r   r;   rJ   rò   r	  rü   rÏ   r   r
   r   )r,   r
   r   rM   r'   r-   Zextracurricularsr%   rù   rò   r	  r   r   r   rù   ©  s     2rù   c                 C   sª   d}|| j voDt| jjƒdkoDd| jjv oD| jjdkoDdt ¡ d k}|rn|dkrnd}d	d
g}t||| ||ƒS |dkr¦|d d	kr¦g | j_| j jd8  _| j	 
d¡ d S )NÚcollegeExtracurricularr   rð   r–   rQ   rR   r$   zFWould you like to continue your extracurricular activities in college?r   r   r)   rO   z9You have decided to quit your extracurricular activities.)r[   rj   rH   rü   râ   r™   r]   r;   rœ   rm   rK   r   r   r   r   r  ½  s    Br  c                 C   s  d}|| j voB| jjoB| jjoB| jjdkoB| jj oBdt ¡ d k}|dkr |r d| jjj d }d }| jD ]}|j	| jjkrl|}ql|rž|j
}t||| ||ƒS nd|dkr|d d	kr| jD ]D}	|	j|d kr¾d
dlm}
 |
| j|	| jƒ d
dlm} || |	ƒ} q¾d S )NÚjobApplicationZworkrQ   rR   r$   zYou have graduated from zJ and are now applying for jobs! What position would you like to apply for?r)   rí   r   r  r  )r[   rH   rì   rð   r™   rÎ   r]   r   rî   r   Zrelated_jobsr;   r  rJ   r  r   r  )r,   r
   r   rM   r'   r-   ZcMajorrì   r%   r™   r  r  r   r   r   r  Ê  s&    @


r  c                 C   s€  d}dt   ¡ d kr|dd„ | jjD ƒ}| jjdk rBdd„ |D ƒ}| jjdkr\d	d„ |D ƒ}|r|t  |¡}d
dgg d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢g d¢ddgg d¢g d¢g d¢g d¢dœ}|j| ¡ v ròt  ||j ¡}nd}|jdv r| j jd8  _nZ|jd v rB| j j	d8  _	| j jd8  _n,|jd!v rn| j j
d8  _
| j jd8  _t||| d"ƒS d S )#NÚnegativeHabitEventrQ   rs   c                 S   s   g | ]}|j d kr|‘qS )Únegative)Z	habitType©r1   Úhabitr   r   r   r3   å  r4   z&negativeHabitEvent.<locals>.<listcomp>rr   c                 S   s   g | ]}|j d vr|‘qS ))Úexcessive_alcohol_consumptionÚsmoking©Únamer  r   r   r   r3   é  r4   r–   c                 S   s   g | ]}|j d kr|‘qS )Ú	tardinessr  r  r   r   r   r3   ë  r4   z@You are late for school again. Your teacher gives you a warning.z8You missed the start of the movie due to your tardiness.)z;You've been biting your nails again. Your fingers are sore.z+Your friends notice your nail biting habit.z:You've bitten your nails to the quick, causing discomfort.)zEYou spend hours overthinking a decision and end up feeling exhausted.z2Your overthinking is causing you sleepless nights.zQYou overthink a situation to the point where it paralyzes you from taking action.)zKYou procrastinate on an important task and now have to rush to complete it.z:Your procrastination has resulted in a late fee on a bill.zIYou procrastinated and now you're stuck with the least desirable options.)zEYou find yourself dwelling on negative thoughts, affecting your mood.z7Your negative thinking is affecting your relationships.zQYou're caught in a loop of negative thinking, making it hard to see the positive.)z:You give in to emotional eating and feel guilty afterward.z2You overeat at dinner and feel uncomfortably full.z:You keep eating past the point of fullness out of boredom.)zWYou haven't been getting much exercise lately, and you're starting to feel the effects.zPYou've been missing your exercise routine, and your energy levels are suffering.z@Your lack of exercise is affecting your mood and overall health.)z.Your eyes are tired from too much screen time.z2You've been on screens all day, causing headaches.z;Your excessive screen time is affecting your sleep pattern.)z2Your impulsive action had unintended consequences.z3Your impulsiveness led to a poor purchase decision.z1Your impulsive behavior led to a risky situation.)zHYou've spent all day trying to make a decision, and it's causing stress.z?Your indecisiveness is causing delays and missed opportunities.z:Your indecisiveness made others make the decision for you.)zHYou've been neglecting your self-care routine and it's starting to show.z9Your lack of self-care is affecting your energy and mood.z1You feel rundown from neglecting basic self-care.zBYou're scrambling to finish a project due to poor time management.z@Your leisure time is cut short due to your poor time management.)zBYou've been stress eating, and it's making you feel uncomfortable.zMYou eat more than usual when you're stressed, and it's affecting your health.z6Your stress eating is leading to discomfort and guilt.)zCThe excessive caffeine is making it hard for you to sleep at night.z6You're feeling jittery from excessive caffeine intake.z2You have a caffeine crash from consuming too much.)zFYou notice a smoker's cough developing. It's a reminder of your habit.zRYou're short of breath during physical activities, a result of your smoking habit.z=Your sense of taste and smell are compromised due to smoking.)zJYour frequent alcohol consumption is leading to regular morning hangovers.z5You're using alcohol as a crutch to deal with stress.z?Your excessive drinking is leading to forgetfulness and regret.)r  Únail_bitingÚoverthinkingÚprocrastinationÚnegative_thinkingÚ
overeatingZunder_exercisingÚexcessive_screen_timeÚimpulsivenessÚindecisivenessÚneglecting_self_careÚpoor_time_managementÚovereating_when_stressedÚexcessive_caffeine_intaker  r  z"Your habit is causing some issues.)r  r  rg   )r  r  r  r  r  r  r  r!  )r  r   r  r  T)r]   rH   Zhabitsr\   r™   rþ   r  Úkeysrœ   r©   Zhealthr/   )r,   r
   r   rM   r'   Znegative_habitsr  Zhabit_messagesr   r   r   r  â  sT    
ýý´Sr  c                 C   s`   d}dt   ¡ d kr\| jjdk r\| jdkr\| jdk r\d}g d¢}|t  |¡7 }t||| dƒS d S )	NÚlowEnergyEventrQ   rO   rr   é   z+After a long day, you're feeling exhausted.)z= To cope you end up scrolling through social media for hours.z* To cope you end up watching TV for hours.z2 To cope you end up playing video games for hours.z/ To cope you end up eating junk food for hours.z- To cope you end up drinking too much alcoholz) To cope you end up lighting a cigarette.T)r]   rH   r©   r+   rþ   r/   )r,   r
   r   rM   r'   ZappendOptionsr   r   r   r#  T  s    0r#  c           
      C   sÄ   d}d}|| j j|  }t ¡ |krÀt| j jƒdkrÀt| dd ƒ}|rÀt|ƒdkrÀ|jdd„ dd t| j jt|ƒd	 ƒ}t |d |d	 … ¡}	| j	|	_	| j j 
|	¡ d
|	j d }t||| dƒS d S )NgH¯¼šò×z>g:Œ0âŽyE>r   ÚhealthConditionsc                 S   s   | j S r(   )ZhealthModifier)Úxr   r   r   Ú<lambda>h  r4   z!healthCondition.<locals>.<lambda>T)ÚkeyÚreverserQ   zYou have been diagnosed with Ú.)rH   r\   r]   rj   r%  ry   ÚsortÚminrþ   r   rK   r   r/   )
r,   r
   r   rM   Zbase_chanceZage_multiplierZtrigger_chanceÚ
conditionsZageIndexÚ	conditionr   r   r   ÚhealthCondition]  s    r/  c                    sd  d}|| j vo@d| jjv o@| jjdko@| jjdk o@dt ¡ d k}tddd	td
dd	tddd	g}|r&|dkr&ddlm}m}	 || ƒ}
|
r&|	| ƒ}|	| ƒ}|j	d |j
 }|j	d |j
 }t||ƒ}|
j|_|j|jg|_| j |¡ d|
j	 d |
j
 d | d | d }t||| ||ƒS |dkrjt‡ fdd„|D ƒd ƒ| jd _| j j| jd jj8  _|r`t|dƒr`|jdkr`ddlm} || |jƒ}
|| |jd ƒ}|| |jd ƒ}|j	d |j
 }|j	d |j
 }d}|j|d krd|
j	 d |
j
 d }nR|j|d kr8d|
j	 d |
j
 d }n(|j|d kr`d|
j	 d |
j
 d }d S ) NÚbullyDilemmar•   rO   rr   rQ   rs   zStand up for your friendrg   r¯   úDon't do anythingr   zJoin in on the bullyingr$   )rT   rS   r>   zYour friend z$  is being bullied by popular kids, z and z What do you do?c                 3   s    | ]}|j ˆ d  kr|V  qdS ©r)   N©r)   ©r1   r)   ©rM   r   r   Ú	<genexpr>¦  r4   zbullyDilemma.<locals>.<genexpr>éÿÿÿÿr&   r"   rW   r   zYou stand up for your friend zE and tell the bullies to stop. They stop and leave your friend alone.z9You don't do anything about the bullying and your friend z continues to be bullied.z,You join in on the bullying and your friend )r[   rH   rƒ   r\   r]   r   rJ   rT   rS   r@   rA   r    r   ÚfriendZbulliesÚactiveDilemmasrK   r;   Únextr$   r©   r   r9   r&   rX   )r,   r
   r   rM   r!   r'   r-   r%   rT   rS   r8  Ú
classmate1Z
classmate2Úclassmate1NameZclassmate2NamerX   r   r5  r   r0  ’  sD    >"
(
 r0  c                    sÞ  d}|| j vo@d| jjv o@| jjdko@| jjdk o@dt ¡ d k}tdddtd	d
dtdddg}|rÎ|dkrÎddlm} || ƒ}	|	jd |	j	 }
d|
 d }t
||ƒ}|	j|_| j |¡ t||| ||ƒS |dkrt‡ fdd„|D ƒd ƒ| jd _| j j| jd jj8  _nÆ|rÚt|dƒrÚt|dƒrÚ|jdkrÚddlm} || |jƒ}|jd |j	 }
d}|j|d krˆd|
 d }n:|j|d kr¦d|
 d }n|j|d krÂd|
 d }| j |¡ | j |¡ d S )NÚbraceletDilemmar•   rg   rr   rQ   rs   zConfront her directly about itr¯   zTell the teacher about itrŒ   r1  r   r$   r˜   r>   zuYou received a bracelet from your grandmother and wear it to school, but one day it went missing. Today you saw that z   is wearing it. What do you do?c                 3   s    | ]}|j ˆ d  kr|V  qdS r2  r3  r4  r5  r   r   r6  Ç  r4   z"braceletDilemma.<locals>.<genexpr>r7  r&   r"   rW   r   zYou confront z„ about the bracelet and she says that she found it on the ground and thought it was pretty. She apologizes and gives it back to you.z>You tell the teacher about the bracelet and she takes it from z and returns it to you.z5You decide not to do anything about the bracelet and z continues to wear it.)r[   rH   rƒ   r\   r]   r   rJ   rS   r@   rA   r    r   rš   r9  rK   r;   r:  r$   r©   r   r9   r&   rX   rm   Úremove)r,   r
   r   rM   r!   r'   r-   r%   rS   r;  r<  rX   rš   r   r5  r   r=  ·  s8    >"

 *r=  )FFr   r   r   r   r   r   )FFF)r   )r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   )r   )r   )r   )r   )r   )r   )r   )r   FFF)r   )r   FF)r   FF)r   )r   )r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FF)r   FFF)r   FFF)Er]   rË   ÚasyncioZopenaiÚosr   r   r   r   r    r   r/   r;   r<   rE   rN   rd   rq   rx   rz   r|   r…   r‹   r”   r›   rž   r¡   r£   r§   r«   r¬   r°   r²   r³   rµ   r·   r¸   r»   r¼   r½   r¿   rÁ   rÂ   rÅ   rÍ   rÑ   rÔ   rÖ   rÛ   rÜ   rä   rè   rë   rï   rô   rö   r÷   rÿ   r   r  r  rù   r  r  r  r#  r/  r0  r=  r   r   r   r   Ú<module>   sˆ   	










D






















	


	
	
	

	

!










r
	
5
%